Last chance! 50% off unlimited learning
Sale ends in
mirt.model
function scans/reads user input to specify the
confirmatory model.mirt.model(input = NULL, file = "", COV = NULL, quiet = TRUE, ...)
matrix
that specifies the model
either with integer or logical values. If the Q-matrix method
is chosen covariancscan()
to suppress console read messagescan()
mirt
, bfactor
, multipleGroup
, or
mixedmirt
There is an optional keyword for specifying the correlation between relationships between factors
called COV
, and non-linear factor products can be included by enclosing the product
combination on the left hand side of the declaration (e.g., (F1*F1)
would create a
quadratic factor for F1
).
[object Object],[object Object],[object Object],[object Object],[object Object]
model <- mirt.model()
F1 = 1,2,3,4-10
F2 = 10-20
(F1*F2) = 1,2,3,4-10
COV = F1*F2
#Or alternatively
s <- 'F1 = 1,2,3,4-10
F2 = 10-20
(F1*F2) = 1,2,3,4-10
COV = F1*F2'
model <- mirt.model(s)
#Q-matrix specification
Q <- matrix(c(1,1,1,0,0,0,0,0,0,1,1,1), ncol=2, dimnames = list(NULL, c('Factor1', 'Factor2')))
COV <- matrix(c(FALSE, TRUE, TRUE, FALSE), 2)
model <- mirt.model(Q, COV=COV)
## constrain various items slopes and all intercepts in single group model to be equal,
# and use a log-normal prior for all the slopes
s <- 'F = 1-10
CONSTRAIN = (1-3, 5, 6, a1), (1-10, d)
PRIOR = (1-10, a1, lnorm, .2, .2)'
model <- mirt.model(s)
## constrain various items slopes and intercepts across groups for use in multipleGroup(),
# and constrain first two slopes within 'group1' to be equal
s <- 'F = 1-10
CONSTRAIN = (1-2, a1)
CONSTRAINB = (1-3, 5, 6, a1), (1-10, d)'
model <- mirt.model(s)
Run the code above in your browser using DataLab