summary.choicer_hb: Summarize a hierarchical Bayes fit

View source: R/methods.R

summary.choicer_hbR Documentation

Summarize a hierarchical Bayes fit

Description

Posterior summaries (mean, SD, equal-tailed credible interval) for the population coefficients b, the mean-function coefficients \theta, the alternative-effect variance \sigma_d^2 (and, for the HMNP, the raw shock variance trace), plus the \delta_j / \xi_j quality ladder, acceptance diagnostics, and a consolidated convergence-diagnostic table (rank-normalized R-hat, ESS bulk/tail, MCSE) built from all retained chains (see rhat(), ess(), mcse()).

Usage

## S3 method for class 'choicer_hb'
summary(object, prob = 0.95, ...)

Arguments

object

A choicer_hmnl or choicer_hmnp object.

prob

Probability mass of the equal-tailed credible interval (default 0.95).

...

Additional arguments (ignored).

Value

A summary.choicer_hb object.

Examples


sim <- simulate_hmnl_data(N = 50, T = 2, J = 3, seed = 42)
fit <- suppressWarnings(run_hmnlogit(sim$data, "task", "alt", "choice", c("x1", "x2"),
                    person_col = "pid",
                    mcmc = list(R = 300, burn = 100)))
summary(fit)


choicer documentation built on Sept. 5, 2026, 1:07 a.m.