View source: R/resp_styles_to_mplus.R
make_mplus_gpcm_model_syntax | R Documentation |
Prepares components of Mplus model description syntax for a GPCM (NRM).
make_mplus_gpcm_model_syntax(
data,
items,
scoringMatrix,
observedExogenous = vector(mode = "character", length = 0L),
observedDependent = vector(mode = "character", length = 0L),
fixSlopes = vector(mode = "character", length = 0L),
reverseCoded = vector(mode = "list", length = 0L),
orthogonal = vector(mode = "character", length = 0L),
weight = NA_character_,
output = "STDYX",
savedata = NA_character_,
analysis = list(ESTIMATOR = "MLR", ALGORITHM = "INTEGRATION", INTEGRATION = "STANDARD",
PROCESSORS = "4"),
title = "Some GPCM model with custom scoring matrix"
)
data |
a data frame |
items |
a character vector of item names or a list describing items
matching to latent traits in a between-item multidimensional model; in the
latter case list elements must be named after column names of the
|
scoringMatrix |
a matrix describing how responses (described in rownames of the matrix) map on scores of latent traits (described in columns of the matrix) |
observedExogenous |
either:
|
observedDependent |
either:
|
fixSlopes |
optionally a character vector of latent trait names
for which item slopes parameters should be fixed across items
(these names need to occur in column names of |
reverseCoded |
optionally a named list of character vectors with names of list elements specifying latent trait names and elements giving names of items that are reverse coded with respect to this latent trait; please note, that these don't need to be given if slopes of the no-RS trait(s) are not fixed across items |
orthogonal |
optionally a character vector of latent trait names indicating which latent traits should be specified as orthogonal to each other (all the mentioned latent traits will be specified as orthogonal to each other and all the other latent traits) |
weight |
optionally a string with a name of the variable storing weights |
output |
optionally a character vector of Mplus options defining what type of results should be included in the output |
savedata |
optionally a string with a name of the file in which factor scores should be saved |
analysis |
a list with elements |
title |
string with a title for the analysis |
For the description of model specification see Details
section in make_mplus_gpcm_vmmc_syntax
A list with elements named TITLE
, VARIABLE
,
ANALYSIS
, MODEL
, MODELCONSTRAINT
, SAVEDATA
,
rdata
, usevariables
that can be used as arguments to the
mplusObject
function from the package MplusAutomation using
do.call
At the moment there is no possibility to prepare models with many no-RS latent traits loading different sets of items.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.