Skip to contents

Forest plot of per-player posterior \(\lambda\) with uncertainty intervals, using relabeled draws. Points colored by the hard partition (fit$estimates$x_hat).

Usage

plot_lambda_uncertainty(
  fit,
  w_ij,
  log_base = 2.718,
  max_n_clust = NULL,
  prob = 0.9,
  palette = NULL,
  clean_fun = clean_players_names,
  x_hat = NULL
)

Arguments

fit

Output from gibbs_BT_SBM() with opt_lambda$lambda_item computed (set keep_lambda=TRUE when sampling).

w_ij

Optional wins matrix to compute marginal wins for ordering and annotation.

log_base

Base for the x-axis logarithm (10 or e). Defaults to 10.

max_n_clust

Where to filter the mcmc x_t. If not specified we use the modal K

prob

Interval probability for HPD (e.g., 0.90).

palette

Named colors for clusters.

clean_fun

Optional player-name cleaner. Default: identity.

Value

A ggplot object.

Examples

if (FALSE) { # \dontrun{
# fit with keep_lambda=TRUE
p <- plot_lambda_uncertainty(fit, prob = 0.90)
} # }