Skip to contents

Given an internal mirt object estimate the bootstrapped standard errors. It may be beneficial to run the computations using multi-core architecture (e.g., the parallel package). Parameters are organized from the freely estimated values in mod2values(x) (equality constraints will also be returned in the bootstrapped estimates).

Usage

boot.mirt(x, R = 100, boot.fun = NULL, technical = NULL, ...)

Arguments

x

an estimated model object

R

number of draws to use (passed to the boot() function)

boot.fun

a user-defined function used to extract the information from the bootstrap fitted models. Must be of the form boot.fun(x), where x is the bootstrap fitted model under investigation, and the return must be a numeric vector. If omitted a default function will be defined internally that returns the estimated parameters from the mod object, resulting in bootstrapped parameter estimate results

technical

technical arguments passed to estimation engine. See mirt for details

...

additional arguments to be passed on to boot(...) and mirt's estimation engine

References

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

Author

Phil Chalmers rphilip.chalmers@gmail.com

Examples


if (FALSE) { # \dontrun{

# 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

} # }