MplusAutomation1.2 package

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

addNode

Add a node to a GRAPHVIZ model

cd

Change directory

checkSubmission

check on the status of submitted Mplus jobs on the cluster

classifyTags

Classifies Tags

clipString

Clip String

coef.mplus.model

Return coefficients for an mplus.model object

compareModels

Compare the output of two Mplus models

confint.mplus.model

Return confidence intervals for an mplus.model object

connectNodes

Connect two nodes

convert_to_filelist

helper function to crawl over the target location, determine if it is ...

createMixtures

Create syntax for a batch of mixture models

createModels

Create Mplus Input Files from Template

createSyntax

Create the Mplus input text for an mplusObject

createVarSyntax

Create Mplus syntax for variable names

detectColumnNames

Detect Column Names

detectMplus

Detect the location/name of the Mplus command

detectVariables

Automatically detect variables from an Mplus model object

dhms_to_hours

helper function to convert a dhms string to the number of hours for co...

divideIntoFields

Divide text into fields

dot-convertData

Convert a matrix or data frame to numeric or integer for Mplus

dot-mplusMultinomial

Internal Function for Multinomial Regression in Mplus

evaluateConditional

Evaluate Conditional

expandCmd

Expand Mplus-style hyphenated variable ranges

extract

Extract function to make Mplus output work with the texreg package

extractAux

Extract Auxiliary condition means and comparisons.

extractClassCounts

Extract Latent Class Counts

extractDataSummary

Function to extract the SUMMARY OF DATA section from Mplus outputs

extractEFAparameters

Extract the model parameters from an EFA Mplus model output

extractFacScoreStats

Extract Factor Score Statistics

extractFreeFile

Extract free file output

extractIndirect_section

Extract Indirect Effects output

extractIndirect

Extract Indirect Effects output

extractInput_1file

Extract and parse Mplus input file

extractModelParameters

(DEPRECATED) Extract model parameters from MODEL RESULTS section.

extractModelSummaries

(DEPRECATED) Extract summary statistics from a single output file or f...

extractModIndices_1chunk

Extract Modification Indices for One Chunk (Section)

extractModIndices_1file

Extract Modification Indices for One File

extractModIndices

(DEPRECATED) Extract model modification indices.

extractParameters_1chunk

Extract Parameters for One Chunk

extractParameters_1file

Extract Parameters for One File

extractParameters_1section

Extract Parameters for One Section

extractR3step

Extract output of R3STEP procedure

extractResiduals_1section

Helper subfunction to extract one section of OUTPUT: RESIDUALS Can be ...

extractResiduals

Extract residual matrices

extractSampstat

Helper function to extract the sample statistics from Mplus output Dep...

extractSummaries_1file

Extract the summaries from one file

extractSummaries_1plan

Worker function used in extractSummaries_1section

extractSummaries_1section

Extract summary information for one section from Mplus output

extractTech1

Extract Technical 1 matrix from Mplus

extractTech10

Extract Technical 10 matrix from Mplus

extractTech12

Extract Technical 12 from Mplus

extractTech15

Extract Technical 15 from Mplus

extractTech3

Extract Technical 3 matrix from Mplus

extractTech4

Extract Technical 4 matrix from Mplus

extractTech7

Extract Technical 7 from Mplus

extractTech8

Extract Technical 8 from Mplus

extractTech9

Extract Technical 9 matrix from Mplus

extractValue

Extract values from Mplus output An internal function used by extractS...

extractWarningsErrors_1file

Extract warnings and errors from 1 mplus file

filter_inp_filelist

helper function to filter a set of Mplus input files based on whether ...

finalizeInitCollection

Finalize Init Collection

friendlyGregexpr

Friendly Regular Expression

get_efa_nfactors

Small helper function to obtain number of factors for an EFA output se...

get_job_status

This function checks the status of one or more compute jobs

get_results

Extract Mplus results

getInitTags

Get Initial Tags

getMultilineSection

Extract a multiline section from Mplus output

getOutFileList

Get Output File List

getSavedata_Bparams

Load the draws from the Bayesian model posterior distribution (SAVEDAT...

getSavedata_Data

Load an analysis dataset from the SAVEDATA command into an R data.fram...

getSavedata_Fileinfo

Read Variable Names, Formats, and Widths from data generated by the SA...

getSavedata_readRawFile

Internal function to load the draws from the Bayesian model posterior ...

getSection

Get an Output Section

graphModel

Create a graphic model from Mplus

htmlout

Read in Mplus Output File from HTML on the Mplus Website

HTMLSummaryTable

Create an HTML file containing a summary table of Mplus model statisti...

isEmpty

Check whether a useable function argument was provided

l_getSavedata_Bparams

Internal function to load the draws from the Bayesian model posterior ...

l_getSavedata_Fileinfo

local function that does the work of getSaveData_Fileinfo

LatexSummaryTable

Display summary table of Mplus model statistics in separate window

long2LGMM

Long data to wide latent growth mixture model

lookupSimpleTags

Simple tag lookup

lookupTech1Parameter

Lookup the matrix element for a give parameter number

lookupValue

Lookup values

matrixExtract

Reconstruct matrix from multi-line text output

minutes_to_dhms

helper function to convert a number of minutes into a dhms-formatted s...

mixtureSummaryTable

Create a summary table of Mplus mixture models

mplus_as.numeric

Convert Mplus Number to Numeric

mplus.traceplot

Plot the samples for each MCMC chain as a function of iterations

MplusAutomation

Automating Mplus Model Estimation and Interpretation

MplusAutomationUtils

Clean data and calculate the md5 hash

mplusAvailable

Check whether Mplus can be found

mplusGLM

Function to fit GLMs in Mplus

mplusModel_r6

mplusModel R6 class

mplusModel

Create an mplusModel object for a given model

mplusModeler

Create, run, and read Mplus models.

mplusObject

Create an Mplus model object

mplusRcov

Create Mplus code for various residual covariance structures.

OS

Functions to identify the operating system

paramExtract

Extract parameters from a data frame of Mplus estimates

parseCatOutput

Parse Categorical Output

parseMplus

Check Mplus code for missing semicolons or too long lines.

parseMplusSyntax

Convert an Mplus syntax string into a parsed list

parseTags

Parses tags in the body section

plot.mplusObject

Plot coefficients for an mplusObject

plotGrowthMixtures

Plot growth mixture models

plotLTA

Plot latent transition model

plotMixtureDensities

Create density plots for mixture models

plotMixtures

Create latent profile plots

prepareMplusData_Mat

Prepare Mplus Data Matrix

prepareMplusData

Create tab-delimited file and Mplus input syntax from R data.frame

print.MplusRstructure

Print an Mplus Residual Structure object

processConditionalTags

Process Conditional Tags

processInit

Process the Init Section

readModels

Read Parameters, Summary Statistics, and Savedata from Mplus Output

recurseReplace

Recursive replace

replaceBodyTags

Replace Body Tags

replaceInitTags

Replace Init Tags

rmVarWarnings

Remove variable name length warnings from Mplus output file

runModels_Interactive

Run Mplus Models Using Graphical Interface

runModels

Run Mplus Models

separateHyphens

Separate Hyphenated Variable Strings

showSummaryTable

Display summary table of Mplus model statistics in separate window

slurm_job_status

check the status of jobs submitted on a SLURM cluster

splitDFByRow

Split a data frame into a list by rows

splitFilePath

Split File and Path into Separate Parts

submitModels

Submit Mplus models to a high-performance cluster scheduler

subsetModelList

Subset a list of Mplus model results

summary.mplus_submission_df

summary function for submission from submitModels

summary.mplusObject

Summarize an mplusObject

SummaryTable

Create a summary table of Mplus model statistics

testBParamCompoundConstraint

Test inequality-constrained hypothesis for two or more parameters base...

testBParamConstraint

Test inequality-constrained hypothesis for two parameters based on ite...

torque_job_status

helper function to get the status of jobs on a TORQUE cluster

trainLGMM

Train a variety of latent growth mixture model

trimSpace

Trim White Space

unlabeledMatrixExtract

Reconstruct matrix from unlabeled multi-line text output

update.mplusObject

Update an Mplus model object

updateCurrentValues

Updates current values

validate_dhms

helper function to validate format of walltime inputs for HPC submissi...

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.

  • Maintainer: Michael Hallquist
  • License: LGPL-3
  • Last published: 2025-09-02