Learn R Programming

mirt (version 1.19)

boot.LR: Parametric bootstrap likleihood-ratio test

Description

Given two fitted models, compute a parametric bootstrap test to determine whether the less restrictive models fits significantly better than the more restricted model. Note that this hypothesis test also works when prior parameter distributions are included for either model. Function can be run in parallel after using a stuitable mirtCluster definition.

Usage

boot.LR(mod, mod2, R = 1000)

Arguments

mod

an estimated model object

mod2

an estimated model object

R

number of parametric bootstraps to use.

Value

a p-value evaluating whether the more restrictive model fits significantly worse than the less restrictive model

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
#standard
dat <- expand.table(LSAT7)
mod1 <- mirt(dat, 1)
mod2 <- mirt(dat, 1, '3PL')

# standard LR test
anova(mod1, mod2)

# boostrap LR test (run in parallel to save time)
mirtCluster()
boot.LR(mod1, mod2, R=200)

# }

Run the code above in your browser using DataLab