makePriors {emIRT} | R Documentation |
Generate Priors for binIRT
Description
makePriors
generates diffuse priors for binIRT
.
Usage
makePriors(.N = 20, .J = 100, .D = 1)
Arguments
.N |
integer, number of subjects/legislators to generate priors for. |
.J |
integer, number of items/bills to generate priors for. |
.D |
integer, number of dimensions. |
Value
x$mu
A (D x D) prior means matrix for respondent ideal points
x_i
.x$sigma
A (D x D) prior covariance matrix for respondent ideal points
x_i
.beta$mu
A ( D+1 x 1) prior means matrix for
\alpha_j
and\beta_j
.beta$sigma
A ( D+1 x D+1 ) prior covariance matrix for
\alpha_j
and\beta_j
.
Author(s)
Kosuke Imai imai@harvard.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.” Working Paper. American Political Science Review, Vol. 110, No. 4 (December), pp. 631-656.
See Also
'binIRT', 'getStarts', '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]