R/extractParameters.R
extractModelParameters.Rd
Extracts the model parameters from the MODEL RESULTS section of one or more Mplus output files.
If a particular output file has more than one results section (unstandardized, stdyx, stdy, and/or std),
a list will be returned. If the target
is a directory, all .out files therein will be parsed
and a single list will be returned, where the list elements are named by the output file name.
Returned parameters often include the parameter estimate, std. err, param/s.e., and twotailed pvalue.
extractModelParameters( target = getwd(), recursive = FALSE, filefilter, dropDimensions = FALSE, resultType )
target  the directory containing Mplus output files (.out) to parse OR the single output file to be parsed. May be a full path, relative path, or a filename within the working directory. Defaults to the current working directory. Example: “C:/Users/Michael/Mplus Runs” 

recursive  optional. If 
filefilter  a Perl regular expression (PCREcompatible) specifying particular output
files to be parsed within 
dropDimensions  Relevant only for multifile parsing. If 
resultType  N.B.: this parameter is deprecated and will be removed in a future version. The
new default is to extract all results that are present and return a list (see below for details).

If target
is a single file, a list containing unstandardized and standardized results will be
returned. If all standardized solutions are available, the list element will be named: unstandardized
,
stdyx.standardized
, stdy.standardized
, and std.standardized
. If confidence intervals
are output using OUTPUT:CINTERVAL, then a list element named ci.unstandardized
will be included.
Each of these list elements is a data.frame
containing relevant model parameters.
If target
is a directory, a list will be returned, where each element contains the results for
a single file, and the toplevel elements are named after the corresponding output file name. Each
element within this list is itself a list, with elements as in the single file case above.
The core data.frame
for each MODEL RESULTS section typically has the following structure:
The header that begins a given parameter set. Example: "FACTOR1 BY"
The particular parameter being measured (within paramHeader
). Example: "ITEM1"
Parameter estimate value.
Standard error of the estimate
Quotient of est/se
, representing ztest/ttest in large samples
Twotailed pvalue for the est_se
quotient.
Posterior standard deviation of the estimate.
Lower 2.5 percentile of the estimate.
Upper 2.5 percentile (aka 97.5 percentile) of the estimate.
Population parameter value.
Average parameter estimate across replications.
Standard deviation of parameter value in population across replications.
Average standard error of estimated parameter value across replications.
Mean squared error.
Proportion of replications whose 95% confidence interval for the parameter includes the population value.
Proportion of replications for which the twotailed significance test of the parameter is significant (p < .05).
Lower 0.5% CI estimate.
Lower 2.5% CI estimate.
Lower 5% CI estimate.
Parameter estimate value.
Upper 5% (i.e., 95%) CI estimate.
Upper 2.5% (i.e., 97.5%) CI estimate.
Upper 0.5% (i.e., 99.5%) CI estimate.
Michael Hallquist
if (FALSE) { ex3.14 < extractModelParameters( "C:/Program Files/Mplus/Mplus Examples/User's Guide Examples/ex3.14.out") }