mitml objects to Mplus formatwrite.mitmlMplus.RdSaves objects of class mitml as a series of text files which can be processed by the statistical software Mplus (Muthen & Muthen, 2012).
write.mitmlMplus(x, filename, suffix = "list", sep = "\t", dec = ".",
na.value = -999)An object of class mitml or mitml.list as produced by panImpute, jomoImpute, mitmlComplete, or similar).
File base name for the text files containing the imputed data sets, specified without file extension.
File name suffix for the index file.
The field separator.
The decimal separator.
A numeric value coding the missing data in the resulting data files.
The Mplus format for multiply imputed data sets comprises a set of text files, each containing one imputed data set, and an index file containing the names of all data files.
During export, factors and character variables are converted to numeric.
To make this more transparent, write.mitmlMplus produces a log file which contains information about the data set and the factors that have been converted.
In addition, a basic Mplus input file is generated that can be used for setting up subsequent analysis models.
None (invisible NULL).
Muthen, L. K., & Muthen, B. O. (2012). Mplus User's Guide. Seventh Edition. Los Angeles, CA: Muthen & Muthen.
if (FALSE) { # \dontrun{
data(studentratings)
fml <- ReadDis + SES ~ ReadAchiev + (1|ID)
imp <- panImpute(studentratings, formula = fml, n.burn = 1000, n.iter = 100, m = 5)
# write imputation files, index file, and log file
write.mitmlMplus(imp, filename = "imputation", suffix = "list", na.value = -999)
} # }