mi.pooled {mi} | R Documentation |
Modeling Function that pulls together the estimates from multiply imputed dataset.
mi.pooled(coef, se, m) 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 |
m |
number of chains for the imputation |
formula |
See lm ,
glm , polr ,
lmer for detail. |
mi.object |
mi object |
family |
See glm , polr ,
lmer for detail. |
rescale |
default is FALSE , see rescale for detail. |
x |
mi.pooled object. |
object |
mi.pooled object. |
digits |
number of significant digits to display, default=2. |
... |
Any option to pass on to lm , glm ,
bayesglm , bayespolr , polr ,
and lmer functions |
call |
the matched call. |
mi.pooled |
pulled estimates from the multiple dataset. |
mi.fit |
estimates from each dataset. |
Yu-Sung Su ys463@columbia.edu,
Andrew Gelman and Jennifer Hill, Data Analysis Using Regression and Multilevel/Hierarchical Models, Cambridge University Press, 2007.
lm
, glm
,
bayesglm
, bayespolr
, polr
,
and lmer
# 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, z, y) dat.xy <- mi:::.create.missing(dat.xy, pct.mis=10) # imputation dat.mi <- mi(dat.xy, n.iter=6, preprocess=FALSE, add.noise=FALSE) # fit models M1 <- lm.mi(y ~ x + z, dat.mi) display(M1) coef(M1) se.coef(M1) M2 <- glm.mi(x ~ y , dat.mi, family = binomial(link="logit")) display(M2) coef(M2) se.coef(M2) M3 <- bayesglm.mi(x ~ y , dat.mi, family = binomial(link="logit")) display(M3) coef(M3) se.coef(M3) M4 <- polr.mi(ordered(z) ~ y, dat.mi) display(M4) coef(M4) se.coef(M4) M5 <- bayespolr.mi(ordered(z) ~ y, dat.mi) display(M5) coef(M5) se.coef(M5) M6 <- lmer.mi(y ~ x + (1|group), dat.mi) display(M6) coef(M6) se.coef(M6) M7 <- glmer.mi(x ~ y + (1|group), dat.mi, family = binomial(link="logit")) display(M7) coef(M7) se.coef(M7)