genMPT {TreeBUGS} | R Documentation |
Generate MPT Frequencies
Description
Uses a matrix of individual MPT parameters to generate MPT frequencies.
Usage
genMPT(theta, numItems, eqnfile, restrictions, warning = TRUE)
Arguments
theta |
matrix of MPT parameters (rows: individuals; columns: parameters). Parameters are assigned by column names of the matrix. all of the parameters in the model file need to be included. |
numItems |
number of responses per tree (a named vector with tree labels) |
eqnfile |
The (relative or full) path to the file that specifies the MPT
model (standard .eqn syntax). Note that category labels must start with a
letter (different to multiTree) and match the column names of |
restrictions |
Specifies which parameters should be (a) constant (e.g.,
|
warning |
whether to show warning in case the naming of data-generating parameters are unnamed or do not match |
See Also
genTraitMPT
and genBetaMPT
to generate
data for latent normal/beta hierarchical distributions.
Examples
# Example: Standard Two-High-Threshold Model (2HTM)
EQNfile <- system.file("MPTmodels/2htm.eqn", package = "TreeBUGS")
theta <- matrix(
c(
.8, .4, .5,
.6, .3, .4
),
nrow = 2, byrow = TRUE,
dimnames = list(NULL, c("Do", "Dn", "g"))
)
genDat <- genMPT(
theta, c(Target = 250, Lure = 250),
EQNfile
)
genDat