Learn R Programming

mitml (version 0.3-1)

write.mitmlMplus: Write mitml objects to Mplus format

Description

Saves objects of class mitml as a series of text files which can be processed by the statistical software Mplus (Muthen & Muthen, 2012).

Usage

write.mitmlMplus(x, filename, suffix="list", sep="", dec=".", na.value=-999)

x{An object of class mitml or mitml.list (i.e., either produced by panImpute/jomoImpute or mitmlComplete).} filename{Basic file name for the text files containing the imputed data sets, to be specified without file extension.} suffix{File name suffix for the index file.} sep{The field separator.} dec{The decimal separator.} na.value{A numeric value coding the missing data in the resulting data files.}

The native Mplus format for multiply imputed data sets comprises a series 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. Therefore, 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 the subsequent analysis models.

None (invisible NULL).

Muthen, L. K., & Muthen, B. O. (2012). Mplus User's Guide. Seventh Edition. Los Angeles, CA: Muthen & Muthen.

[object Object] panImpute, jomoImpute, mitmlComplete 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)

Arguments