I have a short question:
I imputed item data using multiple imputation with the MICE package.
After imputation, I would like to sum items to a total score.
However, my data is now in a mids object, and I can't figure out how to do this simple task.
Does anyone have experience with this "problem"?
I figured it out:
Example code:
# load .mids object
library("miceadds")
Dmi<-load.Rdata2("imp.Rdata",paste(getwd(),"imp",sep=""))
# create object that contains all imputed datasets and the original dataset
D<-complete(Dmi,"long",include=T)
# use rowSums
D$T<-rowSums(D[2:11])
# reconstruct .mids object
Dmi<-as.mids2(D)