This function creates side-by-side violin plots for omega (object-specific worth parameters) using MCMC chains from a BTL or Rank-Clustered BTL distribution.

posterior_ggplots(mcmc, object_names = NULL)

Arguments

mcmc

The matrix output of the mcmc_BTL or mcmc_RCBTL functions.

object_names

An optional vector of object names, in the same index order as the observed data.

Value

A ggplot(s) of side-by-side violin plots for each omega_j.

Examples

Pi <- rBTL(I=30,omega=c(4^2,4^2,4^1,4^1,4^0))
mcmc <- mcmc_BTL(Pi=Pi,J=5,a_gamma=5,b_gamma=3,num_iters=200,chains=2,seed=1)
#> [1] "Estimating chain 1 of 2."
#> [1] "Estimating chain 2 of 2."
posterior_ggplots(mcmc,object_names=paste0("Object ",1:5))