Description Usage Arguments Value Author(s) References See Also Examples
Modeling Function that pulls together the estimates from multiply imputed dataset.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | mi.pooled(coef, se)
lm.mi(formula, mi.object, ...)
glm.mi(formula, mi.object, family = gaussian, ...)
bayesglm.mi(formula, mi.object, family = gaussian, ...)
polr.mi(formula, mi.object, ...)
bayespolr.mi(formula, mi.object, ...)
lmer.mi(formula, mi.object, rescale=FALSE, ...)
glmer.mi(formula, mi.object, family = gaussian, rescale=FALSE, ...)
## S3 method for class 'mi.pooled'
print(x, ...)
## S4 method for signature 'mi.pooled'
coef(object)
## S4 method for signature 'mi.pooled'
se.coef(object)
## S4 method for signature 'mi.pooled'
display(object, digits=2)
|
coef |
list of coefficients |
se |
list of standard errors |
formula |
See |
mi.object |
|
family |
See |
rescale |
default is |
x |
|
object |
|
digits |
number of significant digits to display, default=2. |
... |
Any option to pass on to |
call |
the matched call. |
mi.pooled |
pulled estimates from the multiple dataset. |
mi.fit |
estimates from each dataset. |
Yu-Sung Su suyusung@tsinghua.edu.cn,
Andrew Gelman and Jennifer Hill, Data Analysis Using Regression and Multilevel/Hierarchical Models, Cambridge University Press, 2007.
lm
, glm
,
bayesglm
, bayespolr
, polr
,
and lmer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # true data
n <- 100
x <- rbinom(n,1,.45)
z <- ordered(rep(seq(1, 5),n)[sample(1:n, n)])
y <- rnorm(n)
group <- rep(1:10, 10)
# create artificial missingness
dat.xy <- data.frame(x, y, z)
dat.xy <- mi:::.create.missing(dat.xy, pct.mis=10)
# imputation
IMP <- mi(dat.xy, n.iter=6, add.noise=FALSE)
# fit models
M1 <- lm.mi(y ~ x + z, IMP)
display(M1)
coef(M1)
se.coef(M1)
M2 <- glm.mi(x ~ y , IMP, family = binomial(link="logit"))
display(M2)
coef(M2)
se.coef(M2)
M3 <- bayesglm.mi(x ~ y , IMP, family = binomial(link="logit"))
display(M3)
coef(M3)
se.coef(M3)
M4 <- polr.mi(ordered(z) ~ y, IMP)
display(M4)
coef(M4)
se.coef(M4)
M5 <- bayespolr.mi(ordered(z) ~ y, IMP)
display(M5)
coef(M5)
se.coef(M5)
M6 <- lmer.mi(y ~ x + (1|group), IMP)
display(M6)
coef(M6)
se.coef(M6)
M7 <- glmer.mi(x ~ y + (1|group), IMP, family = binomial(link="logit"))
display(M7)
coef(M7)
se.coef(M7)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.