| 1 |
|
| 2 |
.memiscEnv <- new.env() |
| 3 |
.SummaryTemplates <- list() |
| 4 |
.SummaryStats <- list() |
| 5 |
|
| 6 |
.CoefTemplates <- list() |
| 7 |
.CoefTemplates$default <- c(est="($est:#)($p:*)", |
| 8 |
se="(($se:#))") |
| 9 |
.CoefTemplates$stat <- c(est="($est:#)($p:*)", |
| 10 |
stat="(($stat:#))") |
| 11 |
.CoefTemplates$all <- c(est="($est:#)($p:*)", |
| 12 |
se="(($se:#))", |
| 13 |
stat="(($stat:#))", |
| 14 |
p="(($p:#))" |
| 15 |
) |
| 16 |
.CoefTemplates$all.nostar <- c(est="($est:#)", |
| 17 |
se="(($se:#))", |
| 18 |
stat="(($stat:#))", |
| 19 |
p="(($p:#))" |
| 20 |
) |
| 21 |
.CoefTemplates$horizontal <- t(c(est="($est:#)($p:*)", |
| 22 |
se="(($se:#))")) |
| 23 |
# .CoefTemplates$ci.se <- c(est="($est:3)", |
| 24 |
# se="(($se:#))", |
| 25 |
# ci="[($lwr:#);($upr:#)]") |
| 26 |
|
| 27 |
.CoefTemplates$ci <- c(est="($est:#)", |
| 28 |
lwr="[($lwr:#)", |
| 29 |
upr="($upr:#)]" |
| 30 |
) |
| 31 |
|
| 32 |
|
| 33 |
.CoefTemplates$ci.se <- c(est="($est:#)", |
| 34 |
se="(($se:#))", |
| 35 |
lwr="[($lwr:#)", |
| 36 |
upr="($upr:#)]" |
| 37 |
) |
| 38 |
|
| 39 |
.CoefTemplates$ci.se.horizontal<- matrix(c(est="($est:#)", |
| 40 |
se="(($se:#))", |
| 41 |
lwr="[($lwr:#)", |
| 42 |
upr="($upr:#)]" |
| 43 |
),ncol=2,nrow=2,byrow=TRUE, |
| 44 |
dimnames=list( |
| 45 |
c("est","ci"), |
| 46 |
c("est","se") |
| 47 |
)) |
| 48 |
|
| 49 |
.CoefTemplates$ci.horizontal<- matrix(c(est="($est:#)", |
| 50 |
lwr="[($lwr:#)", |
| 51 |
upr="($upr:#)]"), |
| 52 |
ncol=3,nrow=1,byrow=TRUE, |
| 53 |
dimnames=list( |
| 54 |
c("est"), |
| 55 |
c("est","lwr","upr") |
| 56 |
)) |
| 57 |
|
| 58 |
|
| 59 |
.CoefTemplates$ci.p <- c(est="($est:#)", |
| 60 |
p="(($p:#))", |
| 61 |
lwr="[($lwr:#)", |
| 62 |
upr="($upr:#)]" |
| 63 |
) |
| 64 |
|
| 65 |
.CoefTemplates$ci.p.horizontal<- matrix(c(est="($est:#)", |
| 66 |
p="(($p:#))", |
| 67 |
lwr="[($lwr:#)", |
| 68 |
upr="($upr:#)]" |
| 69 |
),ncol=2,nrow=2,byrow=TRUE, |
| 70 |
dimnames=list( |
| 71 |
c("est","ci"), |
| 72 |
c("est","se") |
| 73 |
)) |
| 74 |
|
| 75 |
|
| 76 |
.SummaryTemplates$lm <- |
| 77 |
c( |
| 78 |
"R-squared" = "($r.squared:f#)", |
| 79 |
"adj. R-squared" = "($adj.r.squared:f#)", |
| 80 |
sigma = "($sigma:#)", |
| 81 |
F = "($F:f#)", |
| 82 |
p = "($p:f#)", |
| 83 |
"Log-likelihood" = "($logLik:f#)", |
| 84 |
Deviance = "($deviance:f#)", |
| 85 |
AIC = "($AIC:f#)", |
| 86 |
BIC = "($BIC:f#)", |
| 87 |
N = "($N:d)" |
| 88 |
) |
| 89 |
.SummaryStats$lm <- c("adj. R-squared","N") |
| 90 |
|
| 91 |
.SummaryTemplates$glm <- |
| 92 |
c( |
| 93 |
"Aldrich-Nelson R-sq." = "($Aldrich.Nelson:f#)", |
| 94 |
"McFadden R-sq." = "($McFadden:f#)", |
| 95 |
"Cox-Snell R-sq." = "($Cox.Snell:f#)", |
| 96 |
"Nagelkerke R-sq." = "($Nagelkerke:f#)", |
| 97 |
phi = "($phi:#)", |
| 98 |
"Likelihood-ratio" = "($LR:f#)", |
| 99 |
p = "($p:#)", |
| 100 |
"Log-likelihood" = "($logLik:f#)", |
| 101 |
Deviance = "($deviance:f#)", |
| 102 |
AIC = "($AIC:f#)", |
| 103 |
BIC = "($BIC:f#)", |
| 104 |
N = "($N:d)" |
| 105 |
) |
| 106 |
.SummaryStats$glm <- c("Log-likelihood","N") |
| 107 |
|
| 108 |
.SummaryTemplates$default <- |
| 109 |
c( |
| 110 |
"Aldrich-Nelson R-sq." = "($Aldrich.Nelson:f#)", |
| 111 |
"McFadden R-sq." = "($McFadden:f#)", |
| 112 |
"Cox-Snell R-sq." = "($Cox.Snell:f#)", |
| 113 |
"Nagelkerke R-sq." = "($Nagelkerke:f#)", |
| 114 |
"Likelihood-ratio" = "($LR:f#)", |
| 115 |
p = "($p:#)", |
| 116 |
"Log-likelihood" = "($logLik:f#)", |
| 117 |
Deviance = "($deviance:f#)", |
| 118 |
AIC = "($AIC:f#)", |
| 119 |
BIC = "($BIC:f#)", |
| 120 |
N = "($N:d)" |
| 121 |
) |
| 122 |
|
| 123 |
.SummaryStats$default <- c("Log-likelihood","N") |
| 124 |
|
| 125 |
.SummaryTemplates$mer <- .SummaryTemplates$lmer |
| 126 |
c( |
| 127 |
"Log-likelihood" = "($logLik:f#)", |
| 128 |
Deviance = "($deviance:f#)", |
| 129 |
AIC = "($AIC:f#)", |
| 130 |
BIC = "($BIC:f#)", |
| 131 |
N = "($N:d)" |
| 132 |
) |
| 133 |
|
| 134 |
|
| 135 |
assign("SummaryTemplates",.SummaryTemplates, envir=.memiscEnv) |
| 136 |
assign("CoefTemplates",.CoefTemplates, envir=.memiscEnv) |
| 137 |
|