lm.mi {mi} | R Documentation |
Linear Regression Function that pulls together the estimates from multiply imputed dataset.
lm.mi(formula, mi.object, ...) ## S3 method for class 'mi.lm': print(x, ...) ## S4 method for signature 'mi.lm': coef(object) ## S4 method for signature 'mi.lm': se.coef(object) ## S4 method for signature 'mi.lm': display(object, digits=2)
formula |
View lm for detail. |
mi.object |
mi object. |
x |
mi.lm object. |
object |
mi.lm object. |
digits |
number of significant digits to display, default=2. |
... |
Any option to pass on to lm function. |
Extracs the starting values from mi.method
object family.
call |
the matched call. |
mi.pooled |
pulled estimates from the multiple dataset. |
mi.fit |
estimates from each dataset. See lm for details. |
Masanao Yajima yajima@stat.columbia.edu, Yu-Sung Su ys463@columbia.edu M.Grazia Pittau grazia@stat.columbia.edu, Andrew Gelman gelman@stat.columbia.edu
Andrew Gelman and Jennifer Hill, Data Analysis Using Regression and Multilevel/Hierarchical Models, Cambridge University Press, 2007.
# true data x<-rnorm(100,0,1) # N(0,1) y<-rnorm(100,(1+2*x),1.2) # y ~ 1 + 2*x + N(0,1.2) # create artificial missingness x[seq(1,100,10)] <- NA y[seq(2,98,10)] <- NA dat.xy <- data.frame(x,y) # imputation dat.mi <- mi(dat.xy) # fitting linear regression fit <- lm.mi(y ~ x, dat.mi) display(fit) coef(fit) se.coef(fit)