Parametric bootstrap of NOMINATE standard errors
Source:R/spatial_voting.R
morie_spatial_voting_nominate_bootstrap.RdLewis & Poole (2004) parametric bootstrap: simulate roll-call matrices from fitted probabilities, re-estimate per bootstrap replicate, compute SE from the bootstrap distribution.
Usage
morie_spatial_voting_nominate_bootstrap(
votes,
ideal_points,
normal_vectors_arr,
cutpoints,
n_boot = 100L,
seed = 42L
)References
Lewis, J. B. and Poole, K. T. (2004). "Measuring Bias and Uncertainty in Ideal Point Estimates via the Parametric Bootstrap." Political Analysis, 12(2).
Examples
set.seed(1)
v <- matrix(stats::rbinom(40, 1, 0.5), 5, 8)
fit <- morie_spatial_voting_dw_nominate(v, max_iter = 5L)
morie_spatial_voting_nominate_bootstrap(
v, fit$ideal_points, fit$normal_vectors, fit$cutpoints, n_boot = 5L)
#> $se_ideal_points
#> [,1] [,2]
#> [1,] 0.03927144 0.08696910
#> [2,] 0.07038480 0.10135607
#> [3,] 0.08214763 0.11470586
#> [4,] 0.06887660 0.13162676
#> [5,] 0.13492223 0.07540698
#>
#> $boot_means
#> [,1] [,2]
#> [1,] 0.3915152 0.5471552
#> [2,] 0.0532093 0.3298160
#> [3,] 0.2830456 0.2806046
#> [4,] 0.4296193 0.6784253
#> [5,] -0.1370382 -0.0269331
#>
#> $n_boot
#> [1] 5
#>