exogenize {irtrees} | R Documentation |
Structural Mapping for an IRTree Model
Description
Expands a wide-form file of item responses to a long-form file supporting structural mappings among latent variables
Usage
exogenize(mat, cmx, items=seq_len(ncol(mat)), endnode, crossitem=NULL)
Arguments
mat |
An integer matrix of IRT responses (columns represent items, rows represent respondents) |
cmx |
The mapping matrix. |
items |
A numeric vector with the column positions of all items
(measurement variables) in |
endnode |
A factor with the same length as |
crossitem |
A factor with the same length as |
Value
A data frame with columns:
person |
a factor identifying the respondent; |
item |
a factor identifying the items; |
exo1 to exoS |
dummy variables identifying the internal nodes: these play the same role as |
endnode |
a factor identifying the end nodes and thus the endogeneous latent variables; |
crossitem |
a factor produced only for crossed designs, identifying the items that are crossed
with |
value |
the binary item responses. |
Author(s)
Ivailo Partchev
References
De Boeck, P. and Partchev, I. (2012). IRTrees: Tree-Based Item Response Models of the GLMM Family, Journal of Statistical Software – Code Snippets, 48(1), 1–28. https://www.jstatsoft.org/v48/c01/.
See Also
Examples
str(linlatT <- exogenize(linlat,
cbind(c(1,0,0), c(1,1,0), c(0,1,0), c(0,1,1), c(0,0,1)),
endnode = rep(1:3, each=10), cross = rep(1:10, 3)))