View source: R/resp_styles_to_mplus.R
make_mplus_gpcm_vmmc_syntax | R Documentation |
Prepares components of Mplus model description syntax.
make_mplus_gpcm_vmmc_syntax(
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_,
itemCategories = rep(list(rownames(scoringMatrix)), length(items)),
trySimpleGPCM = TRUE
)
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 |
itemCategories |
a list of values that a given item takes in the data |
trySimpleGPCM |
a logical value indicating whether to try to use
a simple Mplus GPCM specification instead of the NRM when
|
Models are identified by fixing variances of the the latent
variables that are not mentioned in fixSlopes
to 1 and
by fixing slope parameters to 1 (or -1 in a case of reverse coded
items) and freeing latent trait variances that are mentioned in
fixSlopes
.
Please note that Mplus assumes that the last category is always
scored 0, so if scoringMatrix
contains some non-zero elements in its
last row function will automatically adjust the coding scheme for latent
traits (columns of the scoringMatrix
) where last cell is non-zero by
subtracting value in this cell from the whole column. Typically this will
introduce negative scores to this column, but this is something Mplus can
carry and it doesn't affect estimates of slope parameters. However,
this will make estimated intercept parameters incomparable with the
specification using the original scoring scheme. Also, this will make slope
parameters for a given latent trait negative (while preserving the origin -
for the purpose of interpretation - of the latent trait itself).
A list of strings with elements named VARIABLE
, MODEL
and MODELCONSTRAINT
(the last one can be NULL
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.