mirt (version 1.27.1)

anova-method: Compare nested models with likelihood-based statistics

Description

Compare nested models using likelihood ratio, AIC, BIC, etc.

Usage

# S4 method for SingleGroupClass
anova(object, object2, bounded = FALSE,
  mix = 0.5, verbose = TRUE)

Arguments

object

an object of class SingleGroupClass, MultipleGroupClass, or MixedClass

object2

a second model estimated from any of the mirt package estimation methods

bounded

logical; are the two models comparing a bounded parameter (e.g., comparing a single 2PL and 3PL model with 1 df)? If TRUE then a 50:50 mix of chi-squared distributions is used to obtain the p-value

mix

proportion of chi-squared mixtures. Default is 0.5

verbose

logical; print additional information to console?

References

Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29. 10.18637/jss.v048.i06

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
x <- mirt(Science, 1)
x2 <- mirt(Science, 2)
anova(x, x2)

# 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

# }

Run the code above in your browser using DataLab