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.06387846  0.17189856
#> [2,]  0.01976043 -0.10236709
#> [3,] -0.02974690 -0.07624128
#> [4,] -0.04358272 -0.09268269
#> [5,] -0.01030927  0.09939251
#> 
#> $posterior_sd
#>           [,1]      [,2]
#> [1,] 0.8989262 0.8367086
#> [2,] 0.8331214 0.9040604
#> [3,] 0.9396073 0.9976577
#> [4,] 0.8697736 0.8981933
#> [5,] 0.9441614 0.8099172
#> 
#> $ci_lower
#>           [,1]      [,2]
#> [1,] -1.501753 -1.470299
#> [2,] -1.517420 -1.598781
#> [3,] -1.642998 -1.634302
#> [4,] -1.520775 -1.518671
#> [5,] -1.498227 -1.411488
#> 
#> $ci_upper
#>          [,1]     [,2]
#> [1,] 1.611601 1.529705
#> [2,] 1.516045 1.524073
#> [3,] 1.387443 1.530302
#> [4,] 1.478858 1.561380
#> [5,] 1.587212 1.538706
#> 
#> $n_samples
#> [1] 100
#> 
#> $standardized
#> [1] TRUE
#>