Description Usage Arguments Author(s) References See Also Examples
The plot
method for a mira
object plots the confidence interval length against the number of multiply imputed datasets from 2 to m
. This is a graphical tool to check if the variability due to the simulation of the multiple imputation process can be substantially reduced by increasing the number of generated datasets m
.
1 2 |
x |
An object of class |
... |
Extra arguments for |
Vincent Audigier vincent.audigier@cnam.fr
Schafer, J. L. (1997). Analysis of Incomplete Multivariate Data. Chapman & Hall/CRC, London
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 | require(nlme)
data(CHEM97Na)
ind.clust<-1#index for the cluster variable
#initialisation of the argument predictorMatrix
predictor.matrix<-mice(CHEM97Na,m=1,maxit=0)$pred
predictor.matrix[ind.clust,ind.clust]<-0
predictor.matrix[-ind.clust,ind.clust]<- -2
predictor.matrix[predictor.matrix==1]<-2
#initialisation of the argument method
method<-c("", "2l.2stage.bin", "2l.2stage.pois", "2l.2stage.norm", "") #quickest methods
#multiple imputation by chained equations (parallel calculation)
#res.mice<-mice.par(CHEM97Na,m=15,predictorMatrix = predictor.matrix,method=method)
#analysis (apply a linear mixed effects model to each imputed dataset)
#ana<-with(res.mice,expr=lme(fixed=formula(Score~Sex+GSCE+Age),
# random=formula(~1|School),method="REML",
# control=list(maxIter=100,msMaxIter=100,niterEM=25)))
#graphical investigation for the number of generated datasets m
#plot(ana)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.