readModels: Read Parameters, Summary Statistics, and Savedata from Mplus...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/parseOutput.R

Description

Extracts the model parameters, summary statistics, and savedata from the one or more Mplus output files. This function is essentially a wrapper around extractModelParameters, extractModelSummaries, and getSavedata_Data, respectively. The goal is to have a single function that parses all (supported) aspects of Mplus output and to combine these into a list object, with one element per output file identified.

Usage

1
readModels(target=getwd(), recursive=FALSE, filefilter)

Arguments

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 TRUE, parse all models nested in subdirectories within target. 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

A list with one element per file. Each element is composed of up to three subelements: summaries, parameters, and savedata. If target is a single file, then the top-level elements will be the summaries, parameters, and savedata, not a list of files.

summaries

Summary statistics from extractModelSummaries, having structure as specified by that function

parameters

Model parameters from extractModelParameters, having structure as specified by that function

class_counts

Latent class counts and proportions for models that include a categorical latent variable

mod_indices

Model modification indices from extractModIndices, having structure as specified by that function

savedata_info

File information about SAVEDATA files related to this output

savedata

SAVEDATA file as an R data.frame, as described in getSavedata_Data

bparameters

an mcmc.list object containing the draws from the MCMC chains for a Bayesian model that uses the SAVEDATA: BPARAMETERS command

residuals

a list containing relevant information from OUTPUT: RESIDUALS

tech1

a list containing parameter specification and starting values from OUTPUT: TECH1

tech3

a list containing parameter covariance and correlation matrices from OUTPUT: TECH3

tech4

a list containing means, covariances, and correlations for latent variables from OUTPUT: TECH4

lcCondMeans

conditional latent class means, obtained using auxiliary(e) syntax in latent class models

gh5

a list containing data from the gh5 (graphics) file corresponding to this output. (Requires hdf5 package)

Author(s)

Michael Hallquist

See Also

extractModelSummaries, extractModelParameters, extractModIndices, getSavedata_Fileinfo, getSavedata_Data, getSavedata_Bparams

Examples

1
2
3
4
5
## Not run: 
allOutput <- readModels(
	"C:/Program Files/Mplus/Mplus Examples/User's Guide Examples", recursive=TRUE)

## End(Not run)

MplusAutomation documentation built on May 2, 2019, 5:55 p.m.