Skip to contents

Carroll et al. (2013) mixture model between Gaussian and quadratic utility, sampled via slice sampling (Neal 2003). Porting the slice sampler is beyond this session's budget.

Usage

morie_spatial_voting_alpha_nominate(
  votes,
  n_dims = 2L,
  n_samples = 500L,
  burn_in = 100L,
  seed = 42L
)

Arguments

votes

Vote matrix. @param n_dims Latent dimensions.

n_dims

Integer; latent ideal-point dimensionality (default 2).

n_samples

MCMC samples. @param burn_in Burn-in length.

burn_in

Integer; MCMC burn-in iterations to discard before summarising the posterior.

seed

RNG seed.

Value

List with ideal points, discrimination, difficulty and an engine tag (EM-IRT closed-form approximation).

References

Carroll, R., Lewis, J. B., Lo, J., Poole, K. T., and Rosenthal, H. (2013); Neal, R. M. (2003) Annals of Statistics.

Examples

morie_spatial_voting_alpha_nominate(matrix(0, 5, 5))
#> $ideal_points
#>             [,1]     [,2]
#> [1,]  0.03451343 1.016539
#> [2,] -0.63786317 1.331414
#> [3,] -0.26056360 1.041006
#> [4,] -0.28837748 1.383241
#> [5,] -0.25001500 1.043871
#> 
#> $discrimination
#>              [,1]      [,2]
#> [1,]  0.608461237 -3.971283
#> [2,]  0.922349912 -4.011777
#> [3,] -0.001279056 -4.704735
#> [4,]  0.306571288 -4.643598
#> [5,]  0.562128133 -4.241045
#> 
#> $difficulty
#> [1] -7.024192 -6.922670 -6.373856 -6.376845 -6.749693
#> 
#> $n_dims
#> [1] 2
#> 
#> $n_samples_target
#> [1] 500
#> 
#> $burn_in_target
#> [1] 100
#> 
#> $engine
#> [1] "morie_spatial_voting_em_irt (deterministic EM approximation; full alpha-NOMINATE Gibbs not yet ported -- see Carroll et al 2013)"
#>