December 19, 2014
Using Mplus via R
A new R package is designed to automate three major aspects of latent variable modeling in Mplus:
The package is called MplusAutomation and is written by Michael Hallquist.
MplusAutomation is a package for R that seeks to optimize and streamline the use of Mplus for complex projects such as Monte Carlo simulation studies or the comparison of many models. In particular, MplusAutomation provides routines to 1) create and manage syntax for groups of related models; 2) automate the estimation of many models; and 3) provide tools to extract and compare model fit statistics, parameter estimates, and ancillary model outputs.
Four core routines support these aims: createModels, runModels, readModels, and compareModels. As of MplusAutomation v0.5, the package now supports the extraction of the majority of Mplus output sections as R data.frames and lists that can be readily sorted and compared. Sections extracted include model fit statistics, parameter estimates, confidence intervals, RESIDUALS, TECH1, TECH4, TECH11, TECH14, BPARAMETERS, and SAVEDATA. Fit statistics and parameter estimates for two models can be compared side-by-side using compareModels, which summarizes parameters that differ between models, parameters unique to each model, and chi-square difference tests for nested models (following the computation guidelines provided on www.statmodel.com).
The MplusAutomation package can be installed within R using the following call:
Users are encouraged to post questions about the package to the MplusAutomation Google Group: https://groups.google.com/d/forum/mplusautomation with suggestions for new features and for troubleshooting problems related to the package.
Click here to go to the package.
Click here for documentation.