Description Usage Arguments Value Author(s) See Also Examples
View source: R/extractParameters.R
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.
1 2  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:
paramHeader 
The header that begins a given parameter set. Example: "FACTOR1 BY" 
param 
The particular parameter being measured (within 
est 
Parameter estimate value. 
se 
Standard error of the estimate 
est_se 
Quotient of 
pval 
Twotailed pvalue for the 
In the case of output from Bayesian estimation (ESTIMATOR=BAYES), the data.frame
will contain
a different set of variables, including some of the above, as well as
posterior_sd 
Posterior standard deviation of the estimate. 
lower_2.5ci 
Lower 2.5 percentile of the estimate. 
upper_2.5ci 
Upper 2.5 percentile (aka 97.5 percentile) of the estimate. 
Also note that the pval
column for Bayesian output represents a onetailed estimate.
In the case of output from a Monte Carlo study (MONTECARLO: and MODEL POPULATION:), the data.frame
will contain
a different set of variables, including some of the above, as well as
population 
Population parameter value. 
average 
Average parameter estimate across replications. 
population_sd 
Standard deviation of parameter value in population across replications. 
average_se 
Average standard error of estimated parameter value across replications. 
mse 
Mean squared error. 
cover_95 
Proportion of replications whose 95% confidence interval for the parameter includes the population value. 
pct_sig_coef 
Proportion of replications for which the twotailed significance test of the parameter is significant (p < .05). 
In the case of confidence interval output (OUTPUT:CINTERVAL), the list element ci.unstandardized
will contain
a different set of variables, including some of the above, as well as
low.5 
Lower 0.5% CI estimate. 
low2.5 
Lower 2.5% CI estimate. 
low5 
Lower 5% CI estimate. 
est 
Parameter estimate value. 
up5 
Upper 5% (i.e., 95%) CI estimate. 
up2.5 
Upper 2.5% (i.e., 97.5%) CI estimate. 
up.5 
Upper 0.5% (i.e., 99.5%) CI estimate. 
If the model contains multiple latent classes, an additional variable, LatentClass
,
will be included, specifying the latent class number. Also, the Categorical Latent Variables section
will be included as LatentClass
"Categorical.Latent.Variables."
If the model contains multiple groups, Group
will be included.
If the model contains twolevel output (between/within), BetweenWithin
will be included.
Michael Hallquist
1 2 3 4 5  ## Not run:
ex3.14 < extractModelParameters(
"C:/Program Files/Mplus/Mplus Examples/User's Guide Examples/ex3.14.out")
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.