Skip to contents

Recovers latent stimulus positions from perceptual placement data by estimating respondent-specific intercepts \(a_i\) and slopes \(b_i\) in the model $$z_{ij} = a_i + b_i \hat{z}_j + \epsilon_{ij}.$$ Delegates to basicspace::aldmck when the basicspace package is installed; otherwise a hand-rolled EM/least-squares fallback is used.

Usage

morie_spatial_voting_aldrich_mckelvey(
  Z,
  n_dims = 1L,
  max_iter = 100L,
  tol = 1e-06
)

Arguments

Z

A respondent-by-stimulus numeric matrix of perceptual placements. NA entries are treated as missing.

n_dims

Number of latent dimensions (typically 1).

max_iter

Maximum EM iterations for the fallback solver.

tol

Convergence tolerance on the stimulus configuration.

Value

A list with components zhat (stimulus positions), alpha, beta, weights, iterations, converged, and engine ("basicspace" or "fallback").

References

Aldrich, J. H. and McKelvey, R. D. (1977). "A Method of Scaling with Applications to the 1968 and 1972 Presidential Elections." American Political Science Review, 71(1), 111-130.

Poole, K. T. (1998). "Recovering a Basic Space from a Set of Issue Scales." American Journal of Political Science, 42(3), 954-993.

Armstrong, D. A., Bakker, R., Carroll, R., Hare, C., Poole, K. T., and Rosenthal, H. (2021). Analyzing Spatial Models of Choice and Judgment, 2nd ed. Chapman & Hall/CRC.

Examples

set.seed(1)
Z <- matrix(rnorm(20 * 5), 20, 5)
fit <- morie_spatial_voting_aldrich_mckelvey(Z)
fit$zhat
#> [1]  0.8576122 -0.7803653  0.5189672 -1.3489326  0.7527185