boot_emIRT {emIRT} | R Documentation |
Parametric bootstrap of EM Standard Errirs
Description
boot_emIRT
take an emIRT() object (from binary, ordinal, dynamic, or hierarchical models) and implements
a parametric bootstrap of the standard errors for the ideal points. It assumes you have already run the model
successfully on one of those functions, and takes the output from that estimate, along with the original arguments,
as the arguments for the bootstrap function.
Usage
boot_emIRT(emIRT.out, .data, .starts, .priors, .control, Ntrials=50, verbose=10)
Arguments
emIRT.out |
an emIRT() object, which is output from a call to binIRT(), dynIRT(), ordIRT(), or hierIRT() |
.data |
the data used to produce the emIRT object. |
.starts |
the starts used to produce the emIRT object. |
.priors |
the priors used to produce the emIRT object. |
.control |
the control arguments used to produce the emIRT object. |
Ntrials |
Number of bootstrap trials to run. |
verbose |
Number of trials before progress notification triggers. |
Value
An object of class emIRT
. The output takes the original emIRT.out object and appends the following:
bse |
list, containing only the matrix:
|
Author(s)
Kosuke Imai kimai@princeton.edu
James Lo jameslo@princeton.edu
Jonathan Olmsted jpolmsted@gmail.com
References
Kosuke Imai, James Lo, and Jonathan Olmsted (2016). “Fast Estimation of Ideal Points with Massive Data.” American Political Science Review, Vol. 110, No. 4 (December), pp. 631-656.
See Also
'binIRT', 'ordIRT', 'hierIRT', 'dynIRT'.
Examples
## Not run:
### Binary IRT example
example(binIRT)
boot.bin <- boot_emIRT(lout, .data = rc, .starts = s, .priors = p,
.control = list(threads = 1, verbose = FALSE, thresh = 1e-06), Ntrials=10, verbose=2)
boot.bin$bse$x
### Dynamic IRT example
example(dynIRT)
boot.dyn <- boot_emIRT(lout, .data = mq_data$data.mq, .starts = mq_data$cur.mq,
.priors = mq_data$priors.mq, .control = list(threads = 1, verbose = FALSE,
thresh = 1e-06), Ntrials=10, verbose=2)
boot.dyn$bse$x
### Ordinal IRT example
example(ordIRT)
boot.ord <- boot_emIRT(lout, .data=newrc, .starts=cur, .priors=priors,
.control = list(threads = 1, verbose = TRUE, thresh = 1e-6, maxit=300,
checkfreq=50), Ntrials=5, verbose=1)
boot.ord$bse$x
### Hierarhical IRT example
example(hierIRT, run.dontrun=TRUE)
boot.hier <- boot_emIRT((lout, .data=dwnom$data.in, .starts=dwnom$cur, .priors=dwnom$priors,
.control=list(threads = 8, verbose = TRUE, thresh = 1e-4, maxit=200, checkfreq=1),
Ntrials=5, verbose=1)
boot.hier$bse$x_implied
## End(Not run)