# NOT RUN {
# }
# NOT RUN {
x <- mirt(Science, 1)
x2 <- mirt(Science, 2)
anova(x, x2)
# compare three models sequentially
x2 <- mirt(Science, 1, 'gpcm')
x3 <- mirt(Science, 1, 'nominal')
anova(x, x2, x3)
# in isolation
anova(x)
# with priors on first model
model <- "Theta = 1-4
PRIOR = (1-4, a1, lnorm, 0, 10)"
xp <- mirt(Science, model)
anova(xp, x2)
anova(xp)
# bounded parameter
dat <- expand.table(LSAT7)
mod <- mirt(dat, 1)
mod2 <- mirt(dat, 1, itemtype = c(rep('2PL', 4), '3PL'))
anova(mod, mod2) #unbounded test
anova(mod, mod2, bounded = TRUE) #bounded
# priors
model <- 'F = 1-5
PRIOR = (5, g, norm, -1, 1)'
mod1b <- mirt(dat, model, itemtype = c(rep('2PL', 4), '3PL'))
anova(mod1b)
model2 <- 'F = 1-5
PRIOR = (1-5, g, norm, -1, 1)'
mod2b <- mirt(dat, model2, itemtype = '3PL')
anova(mod1b, mod2b)
# }
Run the code above in your browser using DataLab