
Clinton-Jackman-Rivers Bayesian IRT by Gibbs sampling
Source:R/spatial_voting.R
morie_spatial_voting_cjr_irt.Rd\(P(y_{ij} = 1) = \Phi(\beta_j^\top x_i - \alpha_j)\) with priors
\(x_i \sim N(0, I)\) and \((\alpha_j, \beta_j) \sim N(0, v I)\).
Each sweep draws the latent utilities from their truncated normals
(Albert and Chib 1993), then every \((\alpha_j, \beta_j)\) and every
\(x_i\) from its Gaussian full conditional, as in
MCMCpack::MCMCirt1d and pscl::ideal. All draws are
inverse-CDF transforms of Philox uniforms (sweep t uses stream t), so the
R and Python arms give the same chain.
Usage
morie_spatial_voting_cjr_irt(
votes,
n_dims = 1L,
n_samples = 1000L,
burn_in = 200L,
beta_prior_var = 25,
start = NULL,
seed = 0,
keep_chains = TRUE
)Arguments
- votes
Roll-call matrix of 1, 0 and NA (missing).
- n_dims
Ideal-point dimensions.
- n_samples
Retained sweeps.
- burn_in
Discarded sweeps.
- beta_prior_var
Prior variance \(v\) of the bill parameters.
- start
Optional starting ideal points; default the
morie_spatial_voting_em_irtposterior mode.- seed
Philox key.
- keep_chains
Return the draws as well as the summaries.
Value
List: ideal_point_mean, ideal_point_sd, alpha_mean,
beta_mean, n_samples and, when kept, ideal_point_chain,
alpha_chain, beta_chain.
References
Clinton J, Jackman S & Rivers D (2004). The statistical analysis of roll call data. American Political Science Review, 98(2), 355-370.
Albert J H & Chib S (1993). Bayesian analysis of binary and polychotomous response data. Journal of the American Statistical Association, 88(422), 669-679.