getStarts {emIRT} | R Documentation |
Generate Starts for binIRT
Description
getStarts
generates starting values for binIRT
.
Usage
getStarts(.N, .J, .D, .type = "zeros")
Arguments
.N |
integer, number of subjects/legislators to generate starts for. |
.J |
integer, number of items/bills to generate starts for. |
.D |
integer, number of dimensions. |
.type |
“zeros” and “random” are the only valid types, will generate starts accordingly. |
Value
alpha |
A (J x 1) matrix of starting values for the item difficulty parameter |
beta |
A (J x D) matrix of starting values for the item discrimination parameter |
x |
An (N x D) matrix of starting values for the respondent ideal points |
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 “Fast Estimation of Ideal Points with Massive Data.” Working Paper. Available at http://imai.princeton.edu/research/fastideal.html.
See Also
'binIRT', 'makePriors', 'convertRC'.
Examples
## 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 = 1e-6
)
}
)
## Look at first 10 ideal point estimates
lout$means$x[1:10]