Description Usage Arguments Value Author(s) References See Also Examples
binaryIRT
estimates a binary IRT model with two response categories. Estimation
is conducted using the EM algorithm described in the reference paper below. The algorithm will
produce point estimates that are comparable to those of ideal
,
but will do so much more rapidly and also scale better with larger data sets.
1 2 
.rc 
a list object, in which .rc$votes is a matrix of numeric values containing the data to be scaled. Respondents are assumed to be on rows, and items assumed to be on columns, so the matrix is assumed to be of dimension (N x J). For each item, ‘1’, and ‘1’ represent different responses (i.e. yes or no votes) with ‘0’ as a missing data record. 
.starts 
a list containing several matrices of starting values for the parameters. The list should contain the following matrices:

.priors 
list, containing several matrices of starting values for the parameters. The list should contain the following matrices:

.D 
integer, indicates number of dimensions to estimate. Only a
1 dimension is currently supported. If a higher dimensional model is
requested, 
.control 
list, specifying some control functions for estimation. Options include the following:

.anchor_subject 
integer, the index of the subect to be used in
anchoring the orientation/polarity of the underlying latent
dimensions. Defaults to 
.anchor_outcomes 
logical, should an outcomesbased metric be
used to anchor the orientation of the underlying space. The
outcomesbased anchoring uses a modelfree/nonparametric
approximation to quantify each item's difficulty and each subject's
ability. The postprocessing then rotates the modeldependent results
to match the modelfree polarity. Defaults to 
An object of class binIRT
.
means 
list, containing several matrices of point estimates for the parameters corresponding to the inputs for the priors. The list should contain the following matrices.

vars 
list, containing several matrices of variance estimates for parameters corresponding to the inputs for the priors. Note that these variances are those recovered via variational approximation, and in most cases they are known to be far too small and generally unusable. Better estimates of variances can be obtained manually via the parametric bootstrap. The list should contain the following matrices:

runtime 
A list of fit results, with elements listed as follows: 
iters
integer, number of iterations run.
conv
integer, convergence flag. Will return 1 if threshold reached, and 0 if maximum number of iterations reached.
threads
integer, number of threads used to estimated model.
tolerance
numeric, tolerance threshold for convergence. Identical to thresh argument in input to .control list.
n 
Number of respondents in estimation, should correspond to number of rows in roll call matrix. 
j 
Number of items in estimation, should correspond to number of columns in roll call matrix. 
d 
Number of dimensions in estimation. 
call 
Function call used to generate output. 
Kosuke Imai [email protected]
James Lo [email protected]
Jonathan Olmsted [email protected]
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.
'convertRC', 'makePriors', 'getStarts'.
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57  ## Data from 109th US Senate
data(s109)
## Convert data and make starts/priors for estimation
rc < convertRC(s109)
p < makePriors(rc$n, rc$m, 1)
s < getStarts(rc$n, rc$m, 1)
## Conduct estimates
lout < binIRT(.rc = rc,
.starts = s,
.priors = p,
.control = {
list(threads = 1,
verbose = FALSE,
thresh = 1e6
)
}
)
## Look at first 10 ideal point estimates
lout$means$x[1:10]
lout2 < binIRT(.rc = rc,
.starts = s,
.priors = p,
.control = {
list(threads = 1,
verbose = FALSE,
thresh = 1e6
)
},
.anchor_subject = 2
)
# Rotates so that Sen. Sessions (R AL)
# has more of the estimated trait
lout3 < binIRT(.rc = rc,
.starts = s,
.priors = p,
.control = {
list(threads = 1,
verbose = FALSE,
thresh = 1e6
)
},
.anchor_subject = 10
)
# Rotates so that Sen. Boxer (D CA)
# has more of the estimated trait
cor(lout2$means$x[, 1],
lout3$means$x[, 1]
)
# = 1 > same numbers, flipped
# orientation

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.