This function creates a trace plot for K (the number of rank-clusters, if applicable) and omega (object-level worth parameters) using MCMC chains from a BTL or Rank-Clustered BTL distribution.

trace_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 list containing ggplot(s) containing trace plots of K (if applicable) and omega.

Examples

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

#> 
#> $traceOmega

#>