if (FALSE) {
# standard
mod <- mirt(Science, 1)
booted <- boot.mirt(mod, R=20)
plot(booted)
booted
#run in parallel using snow back-end using all available cores
mod <- mirt(Science, 1)
booted <- boot.mirt(mod, parallel = 'snow', ncpus = parallel::detectCores())
booted
####
# bootstrapped CIs for standardized factor loadings
boot.fun <- function(mod){
so <- summary(mod, verbose=FALSE)
as.vector(so$rotF)
}
# test to see if it works before running
boot.fun(mod)
# run
booted.loads <- boot.mirt(mod, boot.fun=boot.fun)
booted.loads
}
Run the code above in your browser using DataLab