Learn R Programming

MplusAutomation (version 0.6-1)

extractModelSummaries: Extract summary statistics from a single output file or from a group of Mplus models within a directory

Description

Parses a group of Mplus model output files (.out extension) for model fit statistics. At this time, the details extracted are fixed and include: Filename, InputInstructions, Title, Estimator, LL, BIC, aBIC, AIC, AICC, Parameters, Observations, CFI, TLI, RMSEA_Estimate, RMSEA_90CI_LB, RMSEA_90CI_UB, RMSEA_pLT05, ChiSqM_Value, ChiSqM_DF, ChiSq_PValue, BLRT_KM1LL, BLRT_PValue, BLRT_Numdraws). The infrastructure is in place to allow for user-specified selection of summary statistics in future versions.

Usage

extractModelSummaries(target = getwd(),
    recursive = FALSE, filefilter)

Arguments

target
the directory containing Mplus output files (.out) to parse OR the single output file to be parsed. Defaults to the current working directory. Example: "C:/Users/Michael/Mplus Runs"
recursive
optional. If TRUE, parse all models nested in subdirectories within directory. Defaults to FALSE.
filefilter
a Perl regular expression (PCRE-compatible) specifying particular output files to be parsed within directory. See regex or http://www.pcre.org/pcre.txt for details about regular expression syntax.

Value

  • Returns a data.frame containing model fit statistics for all output files within directory. The data.frame contains some of the following variables (depends on model type):
  • TitleTitle for the model, specified by the TITLE: command
  • FilenameFilename of the output file
  • EstimatorEstimator used for the model (e.g., ML, MLR, WLSMV, etc.)
  • LLLog-likelihood of the model
  • BICBayesian Information Criterion
  • aBICSample-Size-Adjusted BIC (Sclove, 1987)
  • AICAkaike's Information Criterion
  • AICCCorrected AIC, based on Sugiura (1978) and recommended by Burnham & Anderson (2002)
  • DICDeviance Information Criterion. Available in ESTIMATOR=BAYES output.
  • ParametersNumber of parameters estimated by the model
  • pDEstimated number of parameters in Bayesian output
  • ObservationsThe number of observations for the model (does not suppport multiple-groups analysis at this time)
  • CFIConfirmatory Fit Index
  • TLITucker-Lewis Index
  • RMSEA_EstimatePoint estimate of root mean squared error of approximation
  • RMSEA_90CI_LBLower bound of the 90% Confidence Interval around the RMSEA estimate.
  • RMSEA_90CI_UBUpper bound of the 90% Confidence Interval around the RMSEA estimate.
  • RMSEA_pLT05Probability that the RMSEA estimate falls below .05, indicating good fit.
  • ChiSqM_ValueModel chi-squared value
  • ChiSqM_DFModel chi-squared degrees of freedom
  • ChiSqM_PValueModel chi-squared p value
  • ObsRepChiSqDiff_95CI_LBLower bound of 95% confidence interval for the difference between observed and replicated chi-square values
  • ObsRepChiSqDiff_95CI_UBUpper bound of 95% confidence interval for the difference between observed and replicated chi-square values
  • PostPred_PValuePosterior predictive p-value
  • BLRT_KM1LLLog-likelihood of the K-1 model (one less class) for the Bootstrapped Likelihood Ratio Test (TECH14).
  • BLRT_PValueP-value of the Bootstrapped Likelihood Ratio Test (TECH14) testing whether the K class model is significantly better than K-1
  • BLRT_NumdrawsThe number of bootstrapped samples used in the Bootstrapped Likelihood Ratio Test
  • SRMRStandardized root mean square residual
  • SRMR.BetweenFor TYPE=TWOLEVEL output, standardized root mean square residual for between level
  • SRMR.WithinFor TYPE=TWOLEVEL output, standardized root mean square residual for within level
  • WRMRWeighted root mean square residual
  • ChiSqBaseline_ValueBaseline (unstructured) chi-squared value
  • ChiSqBaseline_DFBaseline (unstructured) chi-squared degrees of freedom
  • ChiSqBaseline_PValueBaseline (unstructured) chi-squared p value
  • NumFactorsFor TYPE=EFA output, the number of factors
  • T11_KM1StartsTECH11: Number of initial stage random starts for k-1 model
  • T11_KM1FinalTECH11: Number of final stage optimizations for k-1 model
  • T11_KM1LLTECH11: Log-likelihood of the K-1 model used for the Vuong-Lo-Mendell-Rubin LRT
  • T11_VLMR_2xLLDiffTECH11: 2 * Log-likelihood Difference of K-class vs. K-1-class model for the Vuong-Lo-Mendell-Rubin LRT
  • T11_VLMR_ParamDiffTECH11: Difference in number of parameters between K-class and K-1-class model for the Vuong-Lo-Mendell-Rubin LRT
  • T11_VLMR_MeanTECH11: Vuong-Lo-Mendell-Rubin LRT mean
  • T11_VLMR_SDTECH11: Vuong-Lo-Mendell-Rubin LRT standard deviation
  • T11_VLMR_PValueTECH11: Vuong-Lo-Mendell-Rubin LRT p-value
  • T11_LMR_ValueTECH11: Lo-Mendell-Rubin Adjusted LRT value
  • T11_LMR_PValueTECH11: Lo-Mendell-Rubin Adjusted LRT p-value

See Also

regex, runModels, readModels

Examples

Run this code
allExamples <- extractModelSummaries(
    "C:/Program Files/Mplus/Mplus Examples/User's Guide Examples")

Run the code above in your browser using DataLab