Learn R Programming

MplusAutomation (version 1.1.1)

getSavedata_Bparams: Load the draws from the Bayesian model posterior distribution (SAVEDATA BPARAMETERS) command into an R data.frame

Description

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

Usage

getSavedata_Bparams(outfile, discardBurnin = TRUE)

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.

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).

Author

Michael Hallquist, Florian Boeing-Messing

References

http://www.statmodel.com/download/Bayes3.pdf

See Also

getSavedata_Fileinfo, getSavedata_Data

Examples

Run this code
if (FALSE) {
  fileInfo <- getSavedata_Data("C:/Program Files/Mplus/Test Output.out")
}

Run the code above in your browser using DataLab