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 (<>). Specifically, this package provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.

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 Muthén and Muthén ( Specifically, MplusAutomation provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.


You can install the latest release of MplusAutomation directly from CRAN by running


Alternately, if you want to try out the latest development MplusAutomation code, you can install it straight from github using Hadley Wickham's devtools package. If you do not have devtools installed, first install it and then install MplusAutomation. library(devtools)



For questions, answers, and updates on the status of the MplusAutomation package, email or subscribe to the Google group list.


You can find a detailed example of how to use the MplusAutomation package in the vignette .

Here is an example of using the package to run a simple path model using the mtcars dataset built into R.


pathmodel <- mplusObject(
   TITLE = "MplusAutomation Example - Path Model;",
   MODEL = "
     mpg ON hp;
     wt ON disp;",
   rdata = mtcars)

## R variables selected automatically as any variable name that occurs in the MODEL, VARIABLE, or DEFINE section.
## If any issues, suggest explicitly specifying USEVARIABLES.
## A starting point may be:
## USEVARIABLES = mpg disp hp wt;

fit <- mplusModeler(pathmodel, modelout = "model1.inp", run = 1L)

That is all it takes to run Mplus! MplusAutomation takes care of figuring out which variables from your R dataset are used in the model and which are not (if it get's confused, you can also specify usevariables). It creates a dataset suitable for Mplus, calls Mplus to run the model on the dataset, and reads it back into R.

There is even pretty printing now. To see the results:

screenreg(fit, summaries = c("Observations", "CFI", "SRMR"), single.row=TRUE)

              Model 1

MPG<-HP -0.06 (0.01) *** WT<-DISP 0.01 (0.00) *** WT<->MPG -1.02 (0.38) ** MPG<-Intercepts 29.59 (1.53) *** WT<-Intercepts 1.82 (0.18) *** MPG<->MPG 14.04 (3.52) *** WT<->WT 0.21 (0.06) ***

Observations 32 CFI 0.87 SRMR 0.14

*** p < 0.001, ** p < 0.01, * p < 0.05

The fit is not great, to add some extra paths we can update the model.

pathmodel2 <- update(pathmodel, MODEL = ~ . + "
    mpg ON disp;
    wt ON hp;")

fit2 <- mplusModeler(pathmodel2, modelout = "model2.inp", run = 1L)

We can make some pretty output of both models:

  extract(fit, summaries = c("Observations", "CFI", "SRMR")),
  extract(fit2, summaries = c("Observations", "CFI", "SRMR"))),

              Model 1           Model 2

MPG<-HP -0.06 (0.01) *** -0.02 (0.01) WT<-DISP 0.01 (0.00) *** 0.01 (0.00) *** WT<->MPG -1.02 (0.38) ** -0.73 (0.26) ** MPG<-Intercepts 29.59 (1.53) *** 30.74 (1.27) *** WT<-Intercepts 1.82 (0.18) *** 1.68 (0.19) *** MPG<->MPG 14.04 (3.52) *** 8.86 (2.21) *** WT<->WT 0.21 (0.06) *** 0.19 (0.05) *** MPG<-DISP -0.03 (0.01) *** WT<-HP 0.00 (0.00)

Observations 32 32 CFI 0.87 1.00 SRMR 0.14 0.00

*** p < 0.001, ** p < 0.01, * p < 0.05

If you want confidence intervals, those can also be printed, so long as they were requested as part of the output (we did in the initial model, which propogates to later models that were updated()ed based on the original model):

  extract(fit, cis=TRUE, summaries = c("Observations", "CFI", "SRMR")),
  extract(fit2, cis=TRUE, summaries = c("Observations", "CFI", "SRMR"))),

              Model 1                 Model 2               

MPG<-HP -0.06 [-0.08; -0.05] * -0.02 [-0.05; 0.00]
WT<-DISP 0.01 [ 0.00; 0.01] * 0.01 [ 0.01; 0.01] * WT<->MPG -1.02 [-1.77; -0.27] * -0.73 [-1.25; -0.21] * MPG<-Intercepts 29.59 [26.59; 32.58] * 30.74 [28.25; 33.22] * WT<-Intercepts 1.82 [ 1.46; 2.17] * 1.68 [ 1.31; 2.04] * MPG<->MPG 14.04 [ 7.14; 20.95] * 8.86 [ 4.52; 13.20] * WT<->WT 0.21 [ 0.10; 0.32] * 0.19 [ 0.10; 0.28] * MPG<-DISP -0.03 [-0.04; -0.02] * WT<-HP -0.00 [-0.00; 0.00]

Observations 32 32
CFI 0.87 1.00
SRMR 0.14 0.00

  • 0 outside the confidence interval

How to Help

If you have a tutorial or examples using MplusAutomation, please add them to the github Wiki.

In addition, on the Wiki, is a list of publications that cite or use MplusAutomation. If you use MplusAutomation in your own work --- papers, posters, presentations, etc. --- please add a citation to the list, and if possible, include an abstract or link to the full text. This helps us get to know our users and how MplusAutomation is being used.

Finally, if you find bugs or have suggestions for new features or ways to enhance MplusAutomation, please let us know! Just click the 'Issues' button at the top of the github page or go here and open a New Issue.

Lastly, if you use MplusAutomation and have space, we greatly appreciating citations. In addition to being easier to track, the recognition and credit help make it easier for us to continue putting our time into developing and sharing this software!


Version 0.7-3

  • feature: Support use of plausible values for factors in BAYES output using SAVE=FSCORES(NIMP) approach
  • feature: readModels provides initial support for extraction of SUMMARY OF DATA section, including ICCs in 2-level models. See $data_summary.
  • feature: Allow input files to have .in or .inp extension to increase compatibility with lavaan lavExport.
  • feature: Extract residual DSEM outputs containing ^
  • feature: Initial support for extraction of RESULTS IN PROBABILITY SCALE output. See $parameters$probability.scale from readModels().
  • feature: prepareMplusData can now hash filenames for multiply imputed data. Hashing is done for individual files, so that as long as all files exist, the order can be re-arranged or imputations can be dropped and still no new data needs to be written (closes issue #53).
  • feature: prepareMplusData now is more efficient at converting datasets to numeric and utilizes fwrite to increase speed of writing out datasets (closes issue #54).
  • feature: new utility function mplusAvailable() attempts to determine whether Mplus is installed and findable on the system.
  • bugfix: Extract modification indices for thresholds
  • bugfix: Abstract invariance testing summary extraction from Caspar van Lissa into a separate function.
  • bugfix: Fix pred/outcome swap in specific indirect sections
  • bugfix: Handle spaces in SAVEDATA variable information section in Mplus v8+ (e.g., SAVE=FSCORES in BSEM).
  • bugfix: Improve parsing of mixture outputs in mixtureSummaryTable.

Version 0.7-2

  • feature: A host of new features for mixture modeling (thanks to Caspar van Lissa!). See createMixtures, mixtureSummaryTable, plotMixtures, plotGrowthMixtures, plotLTA.
  • feature: Extract standardized indirect effects using readModels(). $indirect now has the same basic section structure as $parameters.
  • feature: Extract indirect effect confidence intervals (unstandardized and standardized) using readModels(). Look at $indirect$ci.unstandardized etc.
  • notice: getSavedata_Data is now deprecated. Use readModels(what="savedata")$savedata for comparable results
  • bugfix: small fix to structure of indirect summaries to avoid lists nested within data.frames.

Version 0.7-1

  • notice: For consistency, covariance.coverage has been renamed covariance_coverage in the list returned from readModels
  • notice: extractModelSummaries and extractModelParameters have been removed in favor of readModels.
  • notice: citation to paper about MplusAutomation provided at startup
  • feature: Refactored readModels parser for identifying major sections. Speeds up function by 7-12%.
  • feature: new 'quiet' parameter for readModels to suppress progress messages.
  • feature: new 'what' parameter for readModels to specify sections to extract.
  • feature: Switch to readLines instead of scan for readModels. 1-2% speed increase.
  • feature: Add local_tmpdir argument to runModels to use location of .inp file for Mplus temporary files (useful for avoiding collisions with multiple Mplus instances)
  • feature: lookupTech1Parameter now accepts an mplus.model object, as generated by readModels()
  • feature: Support multiple groups output for MODEL INDIRECT
  • bugfix: Extract r2 output for Mplus v8 outputs using multiple imputation (has rate of missing column)
  • bugfix: Correction for false positive match on model fit information from new LCA TECH10 output.
  • bugfix: Extract delta (scale factors) vector from TECH1.
  • bugfix: Support different format of MODEL INDIRECT direct effects in v8

Version 0.7

  • notice: extractModelSummaries and extractModelParameters are deprecated in favor of readModels. These will be removed in future.
  • feature: prepareMplusData() and mplusModeler() now have option to not write data, thanks to sda030
  • feature: mplusObject(), mplusModeler(), update(), and createSyntax() all now accommodate monte carlo simulations in Mplus
  • feature: New methods for the confint() function to extract and format confidence intervals. This also allows confidence intervals with the texreg package
  • feature: initial support for extracting MODEL INDIRECT output. See $indirect element from readModels().
  • feature: initial support for extracting SAMPSTAT output. See $sampstat element from readModels().
  • feature: initial support for extracting counts and proportions of categorical data. See $sampstat$proportions.counts element from readModels().
  • feature: extract covariance coverage from "COVARIANCE COVERAGE OF DATA" section. See $covariance.coverage element from readModels().
  • feature: runModels now accepts a single .inp file or a directory as the target
  • feature: readModels now uses tryCatch statements to wrap extraction. This should more gracefully handle unexpected errors.
  • feature: extract potential scale reduction output for ESTIMATOR=BAYES models. See $tech8$psr element from readModels().
  • bugfix: Support for Mplus v5 confidence intervals.
  • bugfix: R2 extraction for models with estimates and scale factors alone
  • bugfix: Handle outputs using DATA IMPUTATION to impute missing data, then analyze a model in older versions of Mplus
  • bugfix: Handle parsing input section in older Mplus (v6.12 and before, I believe) where there was no termination statement
  • bugfix: Extract SRMR from TYPE=THREELEVEL models, if available (Github issue 18)
  • bugfix: Workaround for missing Within Level header for Categorical Latent Variable section of CINTERVAL output in multilevel mixtures (Github issue 25)
  • bugfix: Extract summary statistics for EFA outputs with warning "Too many factors were requested for EFA." (Github issue 45)
  • bugfix: initial support for mplusObject() to recognize lists of variables: x1-x5 expands to x1, x5, and all variables between, when autov=TRUE (Github issue 37), should also be detected whenever a model is updated via update()
  • bugfix: Extract summary statistics for EFA outputs with warning "Too many factors were requested for EFA." (Github issue 45)
  • bugfix: Skip over a parameter section header with no parameter estimates (rare output for growth model)
  • bugfix: Support latent class output sections that contain non-numeric characters (ex8.15.out: "Latent Class C#1")
  • v8 support: Handle removal of leading '1' from TECH output row names for parameter vectors (matrixExtract)
  • v8 support: Extract Prior Posterior Predictive P-Value. See $PriorPostPred_PValue in $summaries
  • v8 support: Extract Within-Level Standardized Estimates for TWOLEVEL models (ex9.32.out). See $wilevel.standardized in $parameters from readModels()
  • v8 support: Support output for AR(1) output variables labeled &1
  • v8 support: Extract Steps section from GPCM IRT output (e.g., ex5.5pcm.out)
  • v8 support: Extract updated IRT PARAMETERIZATION output, including item discriminations, locations, categories, guessing, and upper asymptote
  • v8 support: Initial support for measurement invariance outputs having multiple model fit and results sections

Version 0.6-4

  • feature: prepareMplusData() and mplusObject() / mplusModeler() now handle multiply imputed data
  • feature: added extraction of Chi-Square Test of Model Fit for Binary and Ordered Categorical section
  • feature: added extraction of Chi-Square Test for MCAR under the Unrestricted Latent Class Indicator Model section.
  • feature: added extraction of R-SQUARE output
  • feature: support extraction of equality tests of means using the BCH, DCON, and DU3STEP procedures
  • feature: support means/intercepts and multiple groups in modification indices
  • bugfix: read parameter level headers of TYPE=THREELEVEL output
  • bugfix: matrixExtract was failing to read in Mplus Fortran-style scientific notation (e.g., 1.5533D-06).
  • bugfix: extractParameters_1chunk was failing to read in Base Hazard Parameters sections from output files
  • bugfix: matrixExtract gave improper output when column headers were non-unique
  • bugfix: extract class counts properly from Mplus v7.3+, which changed the section headers
  • feature: added new function, SummaryTable() which is a generic interface to create summary tables and output to the console, popup, HTML, LaTeX, or markdown to support a wider variety of reproducible documents.

Version 0.6-3

  • feature: readModels tries hard to extract estimation errors and warnings into $errors and $warnings, respectively.
  • feature: coef methods for mplus.model and mplusObject class objects are smarter allowing extract methods and the use of texreg package for prettier output
  • feature: mplusObject tries hard (with a note) to guess variables to include from the dataset if usevariables is missing
  • variable name explicitly mentioned when factors are converted to numeric codes by prepareMplusData.
  • bugfix: mplusModeler only runs the input file it generated in a directory now (thanks to Huashan Chen)
  • bugfix: remove trailing slash from path in runModels to avoid file.exists bug on Windows.
  • bugfix: only kill mplus.exe processes on Windows when runModels fails
  • added killOnFail parameter for runModels to give user option of whether to kill mplus.exe processes on failure.
  • bugfix: pickup new top-level section marker "Available post-processing tools:"
  • bugfix: residuals output section naming changed.
  • bugfix: support summary tables for single model input.

Version 0.6-2

  • feature: initial support for extracting TECH7 (sample stats within latent classes)
  • feature: initial support for extracting TECH12 (observed versus estimated sample statistics for TYPE=MIXTURE analyses)
  • loosen dependency on relimp and tcltk packages to permit installation and loading of MplusAutomation without these.
  • read more summary statistics from Mplus MONTECARLO outputs
  • read dispersion parameters for NB models
  • readModels overall and pairwise comparisons of latent class means (Auxiliary E). Thanks to Davide Morselli for initial code.
  • bugfix: readModels was failing when confidence intervals were in probability scale.
  • bugfix: readModels failed to extract BIC for some ESTIMATOR=BAYES outputs.
  • bugfix: extract class counts for cases where k > 9 classes estimated.
  • bugfix: change mplus.traceplot to use names from rhdf5 and permute to chain, iteration, param to match prior code.

Version 0.6-1

  • bugfix: fixed plyr namespace imports
  • bugfix: fixed runModels log file when NULL
  • corrected line length problems in documentation.
  • deleted old createTable routine (not used)
  • removed fields to extract from extractSummaries_1file (not useful).

Version 0.6

  • feature: create Mplus model objects, automatically create and run models using mplusModeler
  • feature: generate code for residual covariance structures for latent growth models using mplusRcov
  • feature: initial support for extracting standardized confidence intervals
  • feature: extract all details of bootstrapped likelihood ratio test
  • feature: initial support for extracting IRT parameterization model results (see $irt.parameterization).
  • added basic documentation for functions including internal functions
  • support 6-column output from multiple imputation analyses that contain "rate of missing" column.
  • fixes to quiet scan commands (thanks to Mikko Ronkko)
  • fixes to use of system call on Mac/Unix (thanks to Mikko Ronkko)
  • move to rhdf5 package (hdf5 no longer maintained)

Version 0.5-4

  • feature: readModels extracts warnings and errors.
  • feature: prepareMplusData now optionally allows for a .inp to be written or for interactive selection of a filename.
  • feature: readModels now stores (somewhat) parsed Mplus input syntax in $input (read from the INPUT INSTRUCTIONS in .out file).
  • feature: readModels now parses error messages from Monte Carlo output (TECH9) into tech9.
  • feature: Mplus software version now extracted as Mplus.version in model summaries.
  • feature: showSummaryTable, LatexSummaryTable, and HTMLSummaryTable now accept model lists from readModels (no need to extract summaries from each).
  • feature: readModels extracts SAMPLE STATISTICS FOR ESTIMATED FACTOR SCORES section associated with PLOT3 into fac_score_stats.
  • feature: extractTech1 now parses TAU(U) sections in mixture models with class-varying thresholds.
  • refactored SAVEDATA parsing to handle Mplus v7 output, which reordered sections in some cases.
  • to enhance formatting, createModels no longer strips blank lines from the template file. Thanks to Ronkko Mikko for the suggestion.
  • bugfix: createModels value lookup during init processing was broken. Thanks to Ronkko Mikko for the bugfix.
  • bugfix: finding the end of the input was failing when an error was encountered in Mplus parsing the input.
  • bugfix: plyr 1.8 rbind.fill no longer accepts NULL inputs, which was breaking model summary extraction.
  • bugfix: reading savedata files was failing for Monte Carlo output when files could not be found.
  • bugfix: support 7-column format for BAYES output that includes significance column.

Version 0.5-3

  • bugfix: in runModels, Mplus_command with spaces would cause error because not quoted.
  • bugfix: testBParamConstraint and testBParamCompoundConstraint did not appropriately combine mcmc lists.
  • feature: readModels extracts TECH3 output from SAVEDATA: TECH3. Stored in $tech3$paramCov.savedata when available. (Thanks to Joe Glass for code to extract free format matrices.)
  • feature: testBParamCompoundConstraint and testBParamConstraint now accept mplus.model object (from readModels).
  • feature: mplus.traceplot to plot the MCMC chain convergence for Bayesian models that have a gh5 file and PLOT: TYPE=PLOT2. (Thanks to Joe Glass for initial plotting code.)
  • include empty gh5 list if unable to read.

Version 0.5-2

  • feature: divide BPARAMETERS by MCMC chain and separate burn-in (first half) versus valid draw (second half). (Adapted from code and insights graciously provided by Florian Boeing-Messing.)
  • feature: Bparameters stored as mcmc.list to promote compatibility with coda package (coda now imported). (Thanks to Davood Tofighi for the suggestion.)
  • feature: readModels imports corresponding gh5 file, if it exists, into list element gh5 (requires hdf5 package).
  • feature: readModels extracts TECH3 parameter covariance and correlation matrices from output, when available (OUTPUT: TECH3).
  • feature: readModels extracts latent class counts and probabilities (only works for models with one categorical latent variable).
  • bugfix: Corrected failure to identify "SAMPLE STATISTICS FOR ESTIMATED FACTOR SCORES" header.
  • bugfix: Chi-square difference test for MLR based on LL did not work for models with only LL and Parameters.
  • bugfix: Scales section of model parameters was not being read properly.
  • bugfix: matrixExtract (tech1, residuals, etc.) now handles blank section appropriately.
  • updated MplusAutomation Examples vignette to reflect greater functionality of readModels.

Version 0.5-1

  • TECH1, RESIDUALS, and TECH4 extraction now support latent class models and multilevel models
  • Added extraction of GAMMA(C) and ALPHA(C) to TECH1 routines.
  • Extracts chi-square difference test results computed using DIFFTEST.
  • compareModels prints DIFFTEST results when available.
  • bugfix: compareModels now prints RMSEA by default when available.
  • remove dependency on reshape package.
  • Extraction of conditional latent class means, auxiliary(e), now supported by readModels.
  • Workaround for bparameters extraction where Mplus does not include categorical latent variable means.
  • bugfix: readModels TECH1 output now extracted properly for TYPE=IMPUTATION.

Version 0.5

  • new function compareModels to compare model summaries and parameters.
  • compareModels supports chi-square difference testing using diffTest=TRUE.
  • extraction of TECH11 output supported by extractModelSummaries.
  • extraction of TECH1 output supported by readModels.
  • added utility function lookupTech1Parameter to find a given parameter number in output.
  • extraction of TECH4 output supported by readModels.
  • extraction of RESIDUALS output supported by readModels.
  • extractModelSummaries now reads summaries (e.g., DIC) from ESTIMATOR=BAYES output.
  • getSavedata_Fileinfo now supports extraction of Monte Carlo variable names.
  • getSavedata_Data now automatically extracts Monte Carlo/Multiple Imputation data as a list.
  • removed wine as default for running Mplus on Linux now that Mplus is native for Linux.
  • specify runModels default mplus location on Mac as /Applications/Mplus/mplus.
  • several updates to MplusAutomation Vignette.
  • showSummaryTable allows user to specify font.
  • added more examples to R help files.
  • bugfix: getSavedata_Data was calling read.table instead of read.fwf after Bparams code was added.
  • bugfix: iterator tags nested within other tag types in template init section were not replaced by createModels.
  • bugfix: getSection now identifies SAVEDATA INFORMATION header correctly.

Version 0.4-3

  • throw specific error when createModels encounters a template file with no body tags (come back later to allow for this).
  • changed names of return list from getSavedata_Fileinfo: breaks compatibility.
  • initial support of reading Bayesian parameters from SAVEDATA BPARAMETERS command.
  • provide inequality constraint tests for bayesian parameter estimates: van de Schoot, Hoijtink, Hallquist, & Boelen, submitted.
  • initial support of model parameter extraction for Monte Carlo output (MONTECARLO: and MODEL POPULATION:) using extractModelParameters.
  • initial support of unstandardized confidence interval output from OUTPUT:CINTERVAL (thanks to Stephen Tueller for initial development of this)
  • reworked detection of major output sections to match a fixed list of options (decrease ambiguity)
  • bugfix: extractModelParameters correctly handles nonconverged output, where only estimates are available.
  • savedata file information now included in readModels list in element savedata_info.

Version 0.4-2

  • initial support for extracting model modification indices, when available: extractModIndices
  • bugfix: Corrected problem with extractModelSummaries failing when analysis or data sections were at the end of the input.
  • bugfix: Corrected whitespace stripping for cases where leading and trailing space is present.

Version 0.4-1

  • initial support for extracting fit statistics from DATA: TYPE=MONTECARLO output (external Monte Carlo)
  • show summary routines now check to make sure that all columns requested are present in the summary data.frame.
  • show summary routines now check for the sortBy column for cases where the sort field is missing.
  • bugfix: properly handle blank sections in model results output.
  • bugfix: getSavedata_Fileinfo now properly handles relative and absolute paths in the savedata location.
  • better debug output for extractModelParameters.

Version 0.4

  • unified model parsing function readModels() implemented. Returns list of summaries, parameters, and savedata output.
  • completely refactored extractModelSummaries. Now handles more summary statistics, including initial support of MI output.
  • extractModelSummaries now drops any fields that are all missing.
  • preliminary support for extracting model summary statistics from EFA output.
  • bugfix: warning for missing LL now falls appropriately after extraction of estimator in extractModelSummaries
  • bugfix: grabResultsSection failed when there was more than one match for a section header.
  • bugfix: extractModelSummaries now correctly extracts SRMR for multilevel models.
  • extractModelSummaries now retains only the filename, not the path, in the Filename field.
  • bugfix: getSavedata_Data now properly handles output file located in the working directory.
  • changed getSavedata_Data to give a warning, not error, when save data not present in output.
  • restrict extractModelSummaries function to TESTS OF MODEL FIT output.
  • bugfix: prepareMplusData now correctly converts factors to numbers.
  • bugfix: prepareMplusData converts periods in variable names to underscores.
  • reorganized source files for improved clarity

Version 0.3-3

  • extractModelParameters extracts 6-column output from estimator=bayes models (Mplus V6).
  • extractModelParameters supports (most) older output format from Mplus 4.2 and later.
  • extractModelParameters function now accepts a single output file or a directory, like extractModelSummaries. Return a list if multiple files.
  • extractModelParameters now extracts unstandardized and standardized results, where available. Returns a list. resultType is deprecated.
  • extractModelParameters now extracts constraints listed under "New/Additional Parameters".
  • bugfix: extractModelParameters omitted latent class regression coefficients in mixture models.
  • bugfix: extractModelParameters could not locate section end for some standardized parameters.
  • bugfix: extractModelParameters failed to identify latent class membership with multiple categorical latent variables.
  • Changed runModels to limit Windows-specific command line tweaks to R running on Windows computers.
  • Removed InputInstructions from extractModelSummaries routine. Made output too cluttered.
  • In extractModelSummaries routine, only warn about missing log-likelihood for ML estimators.
  • Changed runModels_Interactive to use native TCL directory browser on non-Windows machines.
  • Improved runModels_Interactive to place log file in same directory as run target, unless otherwise selected.
  • Changed Mplus call in runModels to use relative filename after changing to the proper directory (improves Linux runs).
  • bugfix: corrected runModels attempt to write log file when NULL specified.
  • plyr 1.0 hid (and changed) the splitter_a function, which made createModels fail. Replaced splitter_a with homespun function.

Version 0.3-2

  • Added prepareMplusData convenience function, used to export data from R to Mplus.
  • Fixed bug in updateCurrentValues that would stop the createModels pipeline when there were no array tags in the init.
  • Fixed bug in processConditionalTags that would delete the body section when there were no matching tags.

Version 0.3-1

  • Removed two browser calls from processInit that were causing pauses in createModels.
  • Reduced console output from createModels (no more "current iterator is" output)
  • Refactored extractModelParameters to handle complex outputs (e.g., multiple groups with twolevel)
  • Refactored extractModelParameters to read standardized estimates from WLS and MUML estimators.

Version 0.3

  • Corrected bug with getSaveData_Fileinfo not reading integer-format variables (e.g., I5).
  • Includes first implementation of Mplus template language: createModels function.
  • Improved handling of runModels log file. Was closing the file before exitRun had completed.
  • Fixed bug in isLogOpen that caused it to error when logFile was NULL.
  • Improved parameter checking in splitFilePath
  • Removed createTable function (now divided into LatexSummaryTable, HTMLSummaryTable, and showSummaryTable functions)
  • Updated Vignette for Mplus template language.

Version 0.2-5

  • Extracts Baseline Chi-square, SRMR, and WRMR using extractModelSummaries.
  • Allows target for extractModelSummaries to be a single file or a directory.
  • extractModelParameters now successfully extracts multiple group analyses.
  • Fixed minor bug in extractModelParameters for calculating keyword match length.
  • Fixed minor bug in regular expression for parseChunk matching leading/trailing spaces (handled by strip.white).

Version 0.2-4

  • Added package vignette (in the inst/doc directory).
  • Included NEWS file.
  • Added flush commands to log file writing in runModels to allow for progress tracking.

Version 0.2-3

  • Separated table-creating functions (previously createTable) into three related routines: showSummaryTable, HTMLSummaryTable, and LatexSummaryTable. createTable will be removed in future versions of the package.

Version 0.2-2

  • Improved extractModelSummaries function to allow for summary statistics located across multiple lines. New summaries include model chi-square, RMSEA, CFI, and TLI.

  • Corrected a bug in extractValue that did not select the correctly utilize match.length from regexpr (failure to subtract 1 in substr).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.7-3 by Michael Hallquist, 4 months ago

Browse source code at

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

Documentation:   PDF Manual  

Task views: Psychometric Models and Methods

LGPL-3 license

Imports utils, boot, plyr, gsubfn, coda, xtable, lattice, texreg, pander, digest, parallel, ggplot2, data.table, rlang

Depends on methods

Suggests rhdf5, tcltk, relimp, testthat

Imported by PathSelectMP, aMNLFA, mlVAR, plotSEMM.

Suggested by ShortForm, semPlot, stuart, tidyLPA.

See at CRAN