boot_emIRT: Parametric bootstrap of EM Standard Errirs

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/bootstrap.R

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

1
  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:

  • x A (N x 1) matrix of bootstrapped standard errors

Author(s)

Kosuke Imai [email protected]

James Lo [email protected]

Jonathan Olmsted [email protected]

References

Kosuke Imai, James Lo, and Jonathan Olmsted “Fast Estimation of Ideal Points with Massive Data.” Working Paper. Available at http://imai.princeton.edu/research/fastideal.html.

See Also

'binIRT', 'ordIRT', 'hierIRT', 'dynIRT'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## 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)

emIRT documentation built on May 29, 2017, 7:10 p.m.