I am running multiple imputations for missing NIS data and I have some trouble writing the imputed data on my hard drive.
As far as I understand, the following code should export a bunch of files (.Rdata, long format, etc), including a .sps file:
# write imputed results on disk
write.mice.imputation(mi.res = imp2,
name = "mids_imp2",
include.varnames = TRUE,
long = TRUE,
mids2spss = TRUE,
spss.dec = ",",
dattype = NULL)
However, after running the code, I get following error message and no sps file is produced:
Error in mice::mids2spss(mi.res, filedat = paste(name, "__SPSS.txt", sep = ""), : unused arguments (filedat = paste(name, "__SPSS.txt", sep = ""), filesps = paste(name, "__SPSS.sps", sep = ""))
I’ve tried every possible way to fix it without success.
I'd appreciate any help with this. Thank you!