Skip to contents

Simulates roll calls from a spatial probit model (normal vector uniform on the sphere, cutting point U(-0.5, 0.5), P(yea) = Phi(beta (x.n - c)), Philox draws) or takes observed votes, and finds each roll call's optimal cutting line or plane exactly (candidate normals perpendicular to pairs in two dimensions, through triples in three), reporting errors and APRE.

Usage

OptimalCuttingLines(ideals, votes = NULL, n_votes = 0, beta = 5, seed = 0)

Arguments

ideals

Ideal points (vector or matrix with 1 to 3 columns).

votes

Optional 0/1/NA vote matrix (legislators by roll calls).

n_votes

Number of roll calls to simulate.

beta

Signal-to-noise of the simulated votes.

seed

Philox seed.

Value

list(votes, normals, cuts, errors, classification, apre, and true_normals, true_cuts when simulated).

References

Poole, K. T. (2000). Nonparametric unfolding of binary choice data. Political Analysis 8, 211-237. Poole, K. T. (2005). Spatial Models of Parliamentary Voting. Cambridge University Press.

Examples

OptimalCuttingLines(c(-1, -0.5, 0.4, 1), votes = matrix(c(0, 0, 1, 1)))$apre
#> [1] 1