mplusModel_r6 | R Documentation |
An R6 class for a single Mplus model
An R6 class for a single Mplus model
Wrapped by 'mplusModel'
input
Mplus input syntax parsed into a list by major section
warnings
Syntax and estimation warnings as a list
parameters
a list containing the parameter estimates for the model
summaries
a list containing the model summary information and statistics
savedata
a list containing the data output by the SAVEDATA command
model_dir
the directory for Mplus files corresponding to this model
inp_file
the location of the Mplus .inp file for this model
out_file
the location of the Mplus .out file for this model
dat_file
the location of the Mplus .dat (data) file for this model
data
the dataset used for estimating this model
Mplus_command
the location of the Mplus program
syntax
the Mplus syntax for this model as a character vector
new()
generate an mplusModel_r6 object
mplusModel_r6$new( syntax = NULL, data = NULL, inp_file = NULL, read = TRUE, Mplus_command = NULL )
syntax
a character vector of Mplus input syntax for this model
data
a data.frame to be used for estimating the model
inp_file
the location of .inp file for this model
read
If TRUE and the .out file already exists, read the contents of the .out file using 'readModels'
Mplus_command
N.B.: No need to pass this parameter for most users (has intelligent defaults). Allows the user to specify the name/path of the Mplus executable to be used for running models. This covers situations where Mplus is not in the system's path, or where one wants to test different versions of the Mplus program.
read()
read the results of an Mplus model from the .out file using 'readModels'
mplusModel_r6$read(force = FALSE)
force
if 'TRUE', re-read the .out file even if was already previously loaded in to this object
write_dat()
write the .inp and .dat files for this model to the intended location
mplusModel_r6$write_dat(overwrite = TRUE, quiet = FALSE, ...)
overwrite
if 'TRUE', overwrite existing data. Default: 'TRUE'.
quiet
if 'TRUE', do not produce messages about the outcome of this command (e.g., a message about overwriting existing data)
...
additional arguments passed to 'prepareMplusData'
write_inp()
write the .inp and .dat files for this model to the intended location
mplusModel_r6$write_inp(overwrite = TRUE, inp_file = NULL, quiet = FALSE)
overwrite
if 'TRUE', overwrite existing data. Default: 'TRUE'.
inp_file
The location of the input file to write. If NULL (default), use the '$inp_file' of this object.
quiet
if 'TRUE', do not produce messages about the outcome of this command (e.g., a message about overwriting existing data)
submit()
submit this model for estimation on an HPC using 'submitModels'
mplusModel_r6$submit(replaceOutfile = "modifiedDate", ...)
replaceOutfile
Currently supports three settings: “always”, which runs all models, regardless of whether an output file for the model exists; “never”, which does not run any model that has an existing output file; and “modifiedDate”, which only runs a model if the modified date for the input file is more recent than the output file modified date (implying there have been updates to the model).
...
additional arguments passed to 'submitModels'
run()
run this model locally using 'runModels'
mplusModel_r6$run(replaceOutfile = "modifiedDate")
replaceOutfile
Currently supports three settings: “always”, which runs all models, regardless of whether an output file for the model exists; “never”, which does not run any model that has an existing output file; and “modifiedDate”, which only runs a model if the modified date for the input file is more recent than the output file modified date (implying there have been updates to the model).
...
additional arguments passed to 'runModels'
clone()
The objects of this class are cloneable with this method.
mplusModel_r6$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.