Package: MplusAutomation 1.3

MplusAutomation: An R Package for Facilitating Large-Scale Latent Variable Analyses in Mplus

Leverages the R language to automate latent variable model estimation and interpretation using 'Mplus', a powerful latent variable modeling program developed by Muthen and Muthen (<https://www.statmodel.com>). Specifically, this package provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.

Authors:Michael Hallquist [aut, cre], Joshua Wiley [aut], Caspar van Lissa [ctb], Daniel Morillo [ctb]

MplusAutomation_1.3.tar.gz
MplusAutomation_1.3.zip(r-4.7)MplusAutomation_1.3.zip(r-4.6)MplusAutomation_1.3.zip(r-4.5)
MplusAutomation_1.3.tgz(r-4.6-any)MplusAutomation_1.3.tgz(r-4.5-any)
MplusAutomation_1.3.tar.gz(r-4.7-any)MplusAutomation_1.3.tar.gz(r-4.6-any)
MplusAutomation_1.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
MplusAutomation/json (API)

# Install 'MplusAutomation' in R:
install.packages('MplusAutomation', repos = c('https://michaelhallquist.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/michaelhallquist/mplusautomation/issues

Pkgdown/docs site:https://michaelhallquist.github.io

Datasets:
  • lcademo - Latent Class Analysis Demonstration

On CRAN:

Conda:

13.81 score 98 stars 15 packages 846 scripts 10.0k downloads 29 mentions 67 exports 46 dependencies

Last updated from:a75a925c8f. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK246
source / vignettesOK276
linux-release-x86_64OK241
macos-release-arm64OK168
macos-oldrel-arm64OK166
windows-develOK174
windows-releaseOK178
windows-oldrelOK239
wasm-releaseOK171

Exports:cdcheckSubmissioncompareModelscreateMixturescreateModelscreateSyntaxdetectMplusextractextract.mplus.modelextract.mplusObjectget_bparametersget_class_countsget_covariance_coverageget_data_summaryget_fac_score_statsget_gh5get_indirectget_inputget_invariance_testingget_lcCondMeansget_mod_indicesget_model_tableget_parametersget_residualsget_resultsget_sampstatget_savedataget_summariesget_tech1get_tech10get_tech12get_tech15get_tech3get_tech4get_tech7get_tech8get_tech9get_warn_errHTMLSummaryTableLatexSummaryTablelong2LGMMlookupTech1ParametermixtureSummaryTablemplus.traceplotmplusAvailablemplusGLMmplusModelmplusModelermplusObjectmplusRcovparamExtractparseCatOutputparseMplusplotGrowthMixturesplotLTAplotMixtureDensitiesplotMixturesprepareMplusDatareadModelsrunModelsrunModels_InteractiveshowSummaryTablesubmitModelsSummaryTabletestBParamCompoundConstrainttestBParamConstrainttrainLGMM

Dependencies:askpassbackportsbootcheckmateclicodacpp11curldata.tabledigestfarverfastDummiesggplot2gluegsubfngtablehttrisobandjsonlitelabelinglatticelifecyclemagrittrmimeopensslpanderpillarpkgconfigplyrprotoR6RColorBrewerRcpprlangS7scalesstringistringrsystexregtibbleutf8vctrsviridisLitewithrxtable

MplusAutomation Examples
Overview | Clarifying the relationship between MplusAutomation and Mplus | Installing and loading the package | Determine the version of MplusAutomation on your machine | Updating the package to the latest version | Exporting data from R to Mplus | Running batches of Mplus models | Basic use of runModels | Advanced use of runModels | Recursing through subdirectories | Logging the outcome of runModels | Skipping models with existing output files | Displaying R output in the console | User-friendly interface to runModels() | readModels(): Extracting all supported data from Mplus output | Extracting model summary statistics | Listing of summary statistics extracted by readModels | Summarizing model fit statistics in tabular form | Displaying the summary table on the screen | Creating a summary table in HTML | Creating a summary table in LaTeX | Extracting model modification indices | Extracting model parameters | Example: Extracting parameters from a single file | Example: Extracting parameters from multiple files | Extracting and combining model results across files and sections | Basic structure of each model results section | Capitalizing on the graphics strength of R to visualize results | Comparing summaries and parameters across models | Creating a group of models from an Mplus template file (createModels()) | Init section | Required init definitions | Tag types | Simple tags | List tags | Iterator tags | Conditional tags | A Complete Example | Caveats and limitations | Circular tag definition | Conditional logic for multiple conditions

Last update: 2026-06-24
Started: 2020-02-16

Working with the mplusModel Object
Overview | Three Ways to Start | Start from Syntax and Data | Start from an Existing .inp File | Write Mplus Files | Update Syntax and Variables | Start from an Existing .out File | Run Locally or Submit to HPC | Summary

Last update: 2026-04-09
Started: 2026-02-13

Submitting Many Mplus Models to an HPC with submitModels()
Motivation | Overview: submitModels() | Key ideas | Minimal examples | Inline HPCC directives inside .inp files | Batching models into combined jobs | Tracking job status | Practical tips

Last update: 2025-08-13
Started: 2025-08-13

Readme and manuals

Help Manual

Help pageTopics
Change directorycd
check on the status of submitted Mplus jobs on the clustercheckSubmission
Return coefficients for an mplus.model objectcoef.mplus.model coef.mplusObject
Compare the output of two Mplus modelscompareModels
Return confidence intervals for an mplus.model objectconfint.mplus.model confint.mplusObject
Create syntax for a batch of mixture modelscreateMixtures
Create Mplus Input Files from TemplatecreateModels
Create the Mplus input text for an mplusObjectcreateSyntax
Detect the location/name of the Mplus commanddetectMplus
Extract function to make Mplus output work with the 'texreg' packageextract extract,mplus.model-method extract,mplusObject-method extract.mplus.model extract.mplusObject
Extract Mplus resultsget_bparameters get_class_counts get_covariance_coverage get_data_summary get_fac_score_stats get_gh5 get_indirect get_input get_invariance_testing get_lcCondMeans get_model_table get_mod_indices get_parameters get_residuals get_results get_sampstat get_savedata get_summaries get_tech1 get_tech10 get_tech12 get_tech15 get_tech3 get_tech4 get_tech7 get_tech8 get_tech9 get_warn_err
Create an HTML file containing a summary table of Mplus model statisticsHTMLSummaryTable
Display summary table of Mplus model statistics in separate windowLatexSummaryTable
Latent Class Analysis Demonstrationlcademo
Long data to wide latent growth mixture modellong2LGMM
Lookup the matrix element for a give parameter numberlookupTech1Parameter
Create a summary table of Mplus mixture modelsmixtureSummaryTable
Plot the samples for each MCMC chain as a function of iterationsmplus.traceplot
Automating Mplus Model Estimation and InterpretationMplusAutomation
Check whether Mplus can be foundmplusAvailable
Function to fit GLMs in MplusmplusGLM
Create an mplusModel object for a given modelmplusModel
Create, run, and read Mplus models.mplusModeler
Internal Function for Multinomial Regression in MplusmplusMultinomial
Create an Mplus model objectmplusObject
Create Mplus code for various residual covariance structures.mplusRcov
Extract parameters from a data frame of Mplus estimatesparamExtract
Parse Categorical OutputparseCatOutput
Check Mplus code for missing semicolons or too long lines.parseMplus
Plot coefficients for an mplusObjectplot.mplusObject
Create density plots for mixture modelsplotMixtureDensities
Create latent profile plotsplotMixtures
Create tab-delimited file and Mplus input syntax from R data.frameprepareMplusData
Print an Mplus Residual Structure objectprint.MplusRstructure
Read Parameters, Summary Statistics, and Savedata from Mplus OutputreadModels
Run Mplus ModelsrunModels
Run Mplus Models Using Graphical InterfacerunModels_Interactive
Separate Hyphenated Variable StringsseparateHyphens
Display summary table of Mplus model statistics in separate windowshowSummaryTable
Submit Mplus models to a high-performance cluster schedulersubmitModels
summary function for submission from 'submitModels'summary.mplus_submission_df
Summarize an mplusObjectsummary.mplusObject
Create a summary table of Mplus model statisticsSummaryTable
Test inequality-constrained hypothesis for two or more parameters based on iterations of MCMC chainstestBParamCompoundConstraint
Test inequality-constrained hypothesis for two parameters based on iterations of MCMC chainstestBParamConstraint
Train a variety of latent growth mixture modeltrainLGMM
Update an Mplus model objectupdate.mplusObject