I am looking for a way to export the mice object to a file such that I could load it back in the future for further analysis. I found some information about using miceadds::write.mice.imputation to save the data to local files. I also find a similar post in Exporting multiple imputed objects with MICE But the accepted answer in that post does not really solve the problem, write.mice.imputation could save the imputed data, variable list, and so on to the file but it does not save the information to reconstruct a mice object.
library(mice)
library(miceadds)
imp <- mice::parlmice(data=nhanes, n.core = 4, n.imp.core = 1, m=3, maxit = 50, print=T)
write.mice.imputation(mi.res=imp, name="mice_imp1")
I saw the folder mice_imp1 created in local and some data saved in there as well. But using the following code to load the data does not regenerate the mice object
library(mice)
library(miceadds)
oldData <- read.table("mice_imp1/mice_imp1__IMPDATA1.dat")
stripplot(oldData, pch=20, cex=2) # this line gives error
the last line does not compile since oldData is just data but not a mice object.
