getSavedata_Bparams: Load the draws from the Bayesian model posterior distribution...

Description Usage Arguments Value Note Author(s) See Also

View source: R/extractSaveData.R

Description

This function reads a the BPARAMETERS output file from the Mplus SAVEDATA BPARAMETERS command and returns an R data.frame object.

Usage

1
getSavedata_Bparams(outfile, discardBurnin=TRUE)

Arguments

outfile

required. The name of the Mplus output file to read. Can be an absolute or relative path. If outfile is a relative path or just the filename, then it is assumed that the file resides in the working directory getwd().

discardBurnin

optional. Whether to discard the burn-in phase of each MCMC chain (i.e., the first half).

Value

a list containing the draws from the MCMC chains for a Bayesian model that uses the SAVEDATA BPARAMETERS command. Each list element corresponds to a single MCMC chain, as specified by the ANALYSIS: CHAINS syntax in Mplus. If discardBurnin is FALSE, then a superordinate list is provided that divides output in terms of burn-in versus valid draw halves of the MCMC chains. For documentation of how Mplus implements chain convergence checks and MCMC draws, see here: http://www.statmodel.com/download/Bayes3.pdf.

Note

Note that the outfile parameter should refer to the Mplus output file (.out extension), not the actual dataset generated by SAVEDATA. This function reads information about the dataset from the .out file and loads the dataset accordingly.

Author(s)

Michael Hallquist, Florian Boeing-Messing

See Also

getSavedata_Fileinfo, getSavedata_Data


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