[R] Extract estimates from each dataset: MI package
KDT
dkadengye at gmail.com
Fri Jun 18 12:50:41 CEST 2010
Thanks Joris and pardon me for over assuming. let me add more information.
My data is very huge and it is nested with repeated measurements. This is a
sample of the dataset.
id sex lang sch age chapt item length Resp
1 1 0 8 27.02095 3 1 4 0
1 1 0 8 27.02095 3 2 10 0
1 1 0 8 27.02095 1 3 10 0
1 1 0 8 27.02095 2 4 68 0
1 1 0 8 27.02095 2 5 63 NA
2 1 1 4 21.04946 3 1 4 NA
2 1 1 4 21.04946 3 2 10 1
2 1 1 4 21.04946 1 3 10 0
2 1 1 4 21.04946 2 4 68 NA
2 1 1 4 21.04946 2 5 63 NA
3 1 0 1 29.69218 3 1 4 NA
3 1 0 1 29.69218 3 2 10 1
3 1 0 1 29.69218 1 3 10 1
3 1 0 1 29.69218 2 4 68 1
3 1 0 1 29.69218 2 5 63 1
4 1 0 3 26.95328 3 1 4 0
4 1 0 3 26.95328 3 2 10 NA
4 1 0 3 26.95328 1 3 10 1
4 1 0 3 26.95328 2 4 68 0
4 1 0 3 26.95328 2 5 63 NA
he imputation model and the model I am fitting are is as follows:
imp <- mi(mydata,n.iter=6,n.imp=3, rand.imp.method="bootstrap",
preprocess=F,
run.past.convergence=F, check.coef.convergence=T,add.noise=F, post.run=F)
model <- lmer.mi(Resp~1+ sex + lang + age + length + (1|id) + (1|item)+
(1|sch) + (1|chapt),imp, family=binomial(link="logit"))
print(modelmi)
display(modelmi)
After fitting a model, I can use display(model) to visualize the pooled
estimates as well as estimates of each imputed dataset. I can visualize
these also by typing print(model).
However I would like to know how I can extract estimates of single imputed
datasets. I have tried several commands for the first imputed dataset like
mi.pooled$coefficients[[1]] , summary(model$analyses[[1]], etc etc but each
do not work and i keep getting an error "object of type 'closure' is not
subsettable"
Hope this makes my question clear.
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/Extract-estimates-from-each-dataset-MI-package-tp2259864p2260019.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list