
L
vector or matrix of
numeric contrasts. Requires that the model information
matrix be computed (including SE = TRUE
when using
the EM method). Use wald(model)
to observe how the
information matrix columns are named, especially if the
estimated model contains constrained parameters (e.g.,
1PL). The information matrix names are labelled according
to which parameter number(s) they correspeond to (to
check the original numbering use the option pars =
'values'
in the original estimation function).wald(object, L, C = 0) ## S3 method for class 'wald':
print(x, ...)
mirt
,
bfactor
, confmirt
, multipleGroup
, or
mixedmirt
#View parnumber index
data(LSAT7)
data <- expand.table(LSAT7)
cmodel <- confmirt.model()
F1 = 1,4,5
F2 = 2,3
mod <- mirt(data, cmodel, SE = TRUE)
coef(mod)
#see how the infomation matrix relates to estimated parameters, and how it lines up with the index
(infonames <- wald(mod))
index <- mirt(data, cmodel, pars = 'values')
index
#second factor slope equal to 0?
L <- rep(0, 10)
names(L) <- infonames
L[3] <- 1
wald(mod, L)
#simultaneously test equal factor slopes for item 2 and 3, and 4 and 5
L <- matrix(0, 2, 10)
colnames(L) <- infonames #colnames() not required
L[1,3] <- L[2, 7] <- 1
L[1,5] <- L[2, 9] <- -1
L
wald(mod, L)
#logLiklihood tests (requires estimating a new model)
mod2 <- mirt(data, cmodel, constrain = list(c(7,12), c(16,21)))
anova(mod2, mod)
Run the code above in your browser using DataLab