The MplusAutomation package leverages the flexibility of the R language to automate latent variable model estimation and interpretation using 'Mplus', a powerful latent variable modeling program developed by Muthen and Muthen (http://www.statmodel.com). Specifically, MplusAutomation provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.
The MplusAutomation package has four primary purposes:
To automatically run groups/batches of models.
To provide routines to extract model fit statistics, parameter estimates, and raw data from 'Mplus' output files.
To facilitate comparisons among models
To provide a template language that allows for the creation of related input files.
The core routine for running batches of models is
an easy-to-use GUI wrapper,
The core routine for extracting information from 'Mplus' outputs is
returns a list containing all output sections that the package can extract.
To extract summaries, parameters, modification indices, SAVEDATA output, and all other sections that the package
can understand, use the
readModels function. This is the recommended way to extract 'Mplus'
output with this package. If the
target argument to
readModels is a single .out file,
mplus.model (that is also a
list) will be returned containing all output sections that
the package can extract. If
target is a directory, a list of
mplus.model objects will be returned,
named according to the output filenames.
extractModelSummaries is deprecated and
readModels should be preferred.
To extract model summary statistics from one or more output files, see
extractModelSummaries, which returns a
fit statistics for models located within a directory. Model fit results can
be summarized in tabular form (for comparing among models) using
showSummaryTable (displays table in separate window),
HTMLSummaryTable (creates HTML file containing summary table),
LatexSummaryTable (returns a LaTex-formatted table of
Deprecated: To extract raw data created by the SAVEDATA command (e.g., class membership probabilities
or factor scores), see
Deprecated: To extract unstandardized or standardized parameter estimates from a single output file,
Detailed model fit and parameter comparisons between two models can be obtained using
To create a group of related models from a single template, see
Please read the MplusAutomation vignette provided along with the package (and on the CRAN website)
in order to understand the template language: vignette("Vignette", package="MplusAutomation").
In addition to the major functions above, a function for converting an R data.frame
for use with 'Mplus' is provided:
prepareMplusData. This converts the
data.frame to a tab-delimited file and provides an 'Mplus' syntax stub for variable names.
Maintainer: Michael Hallquist firstname.lastname@example.org
Mplus software. Muthen and Muthen. http://www.statmodel.com
runModels for an example running a model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.