Displaying 1 result from an estimated 1 matches for "imputationmodel".
2007 May 10
0
Need help imputing missing data using mice and outputting them
Hello!
I am trying to impute missing data and output the results of the imputation.
My data set is called: MyData.
I have a bunch of variables all of which start with Q20_ - and some of them have missing values.
Here is what I've been doing:
imputationmodel<-mice( MyData[ c (grep("Q20_", names(MyData)) ) ] )
multipledataset<-complete(imputationmodel,action="long")
write.table(as.data.frame(lapply(multipledataset,function(x) {as.numeric(is.element(x,5))} )), sep="\t",file="multiset.txt",row.names=F)
The...