Skip to contents

Posterior summaries for a Bayesian IRT chain

Usage

morie_spatial_voting_bayesian_irt_posterior(chain, standardize = TRUE)

Arguments

chain

Array of shape (n_samples, n_leg, n_dims).

standardize

Whether to per-sample standardise.

Value

List with posterior_mean, posterior_sd, ci_lower, ci_upper, n_samples, standardized.

References

Jackman (2009).

Examples

ch <- array(rnorm(100 * 5 * 2), c(100, 5, 2))
morie_spatial_voting_bayesian_irt_posterior(ch)
#> $posterior_mean
#>              [,1]        [,2]
#> [1,] -0.028479923 -0.18250314
#> [2,] -0.008715831 -0.05179113
#> [3,] -0.079108162  0.18840211
#> [4,]  0.035137328  0.00512074
#> [5,]  0.081166588  0.04077142
#> 
#> $posterior_sd
#>           [,1]      [,2]
#> [1,] 0.9010696 0.7905659
#> [2,] 0.9467577 0.8858114
#> [3,] 0.8596676 0.9705639
#> [4,] 0.9085963 0.9492706
#> [5,] 0.8674289 0.8448231
#> 
#> $ci_lower
#>           [,1]      [,2]
#> [1,] -1.539669 -1.616853
#> [2,] -1.580021 -1.546723
#> [3,] -1.472799 -1.643661
#> [4,] -1.527294 -1.538974
#> [5,] -1.452104 -1.525224
#> 
#> $ci_upper
#>          [,1]     [,2]
#> [1,] 1.559050 1.351763
#> [2,] 1.498108 1.563902
#> [3,] 1.541647 1.577010
#> [4,] 1.505739 1.622813
#> [5,] 1.511288 1.415593
#> 
#> $n_samples
#> [1] 100
#> 
#> $standardized
#> [1] TRUE
#>