
Dynamic IRT with random-walk priors (stub)
Source:R/spatial_voting.R
morie_spatial_voting_dynamic_irt.RdTime-series IRT where ideal points evolve via a random walk: \(\phi_{i,t} \sim N(\phi_{i,t-1}, \tau^2)\).
Usage
morie_spatial_voting_dynamic_irt(
votes,
time_periods,
n_samples = 500L,
burn_in = 100L,
seed = 42L
)Value
List of per-period ideal-point matrices with an engine
tag flagging the per-period EM approximation.
References
Martin, A. D. and Quinn, K. M. (2002). "Dynamic Ideal Point Estimation via Markov Chain Monte Carlo for the U.S. Supreme Court, 1953-1999." Political Analysis, 10(2).
Examples
morie_spatial_voting_dynamic_irt(matrix(0, 4, 4), 1:4)
#> $per_period
#> $per_period$`1`
#> $per_period$`1`$period
#> [1] 1
#>
#> $per_period$`1`$ideal_points
#> [,1]
#> [1,] 0.58716913
#> [2,] -0.36851679
#> [3,] 0.08946095
#> [4,] 0.22264344
#>
#> $per_period$`1`$discrimination
#> [,1]
#> [1,] -0.5749566
#>
#> $per_period$`1`$difficulty
#> [1] -10.47267
#>
#> $per_period$`1`$n_votes_in_period
#> [1] 1
#>
#>
#> $per_period$`2`
#> $per_period$`2`$period
#> [1] 2
#>
#> $per_period$`2`$ideal_points
#> [,1]
#> [1,] 0.58716913
#> [2,] -0.36851679
#> [3,] 0.08946095
#> [4,] 0.22264344
#>
#> $per_period$`2`$discrimination
#> [,1]
#> [1,] -0.5749566
#>
#> $per_period$`2`$difficulty
#> [1] -10.47267
#>
#> $per_period$`2`$n_votes_in_period
#> [1] 1
#>
#>
#> $per_period$`3`
#> $per_period$`3`$period
#> [1] 3
#>
#> $per_period$`3`$ideal_points
#> [,1]
#> [1,] 0.58716913
#> [2,] -0.36851679
#> [3,] 0.08946095
#> [4,] 0.22264344
#>
#> $per_period$`3`$discrimination
#> [,1]
#> [1,] -0.5749566
#>
#> $per_period$`3`$difficulty
#> [1] -10.47267
#>
#> $per_period$`3`$n_votes_in_period
#> [1] 1
#>
#>
#> $per_period$`4`
#> $per_period$`4`$period
#> [1] 4
#>
#> $per_period$`4`$ideal_points
#> [,1]
#> [1,] 0.58716913
#> [2,] -0.36851679
#> [3,] 0.08946095
#> [4,] 0.22264344
#>
#> $per_period$`4`$discrimination
#> [,1]
#> [1,] -0.5749566
#>
#> $per_period$`4`$difficulty
#> [1] -10.47267
#>
#> $per_period$`4`$n_votes_in_period
#> [1] 1
#>
#>
#>
#> $periods
#> [1] 1 2 3 4
#>
#> $n_periods
#> [1] 4
#>
#> $n_legislators
#> [1] 4
#>
#> $n_samples_target
#> [1] 500
#>
#> $burn_in_target
#> [1] 100
#>
#> $engine
#> [1] "morie_spatial_voting_em_irt per-period (deterministic EM approximation; full Martin-Quinn dynamic-IRT with Brownian-motion smoothing not yet ported -- see Martin & Quinn 2002)"
#>