Extract posterior means from a hierarchical Bayes fit
Examples
# \donttest{
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)))
#> MCMC run time 0h:0m:0.01s
coef(fit)
#> x1 x2
#> 0.5880772 -0.5520164
coef(fit, component = "delta")
#> 1 2 3
#> 0.26708115 -0.02969955 0.22955716
# }