Returns fixed effects, random effects, and model-fit statistics in a single named list.
Usage
posterior_summary_hbm(model, probs = c(0.025, 0.975), ...)Value
A named list with components fixed_effects,
random_effects, and model_fit (containing loo,
waic, and R2).
Examples
# \donttest{
library(hbsaems)
library(brms)
data("data_fhnorm")
model <- hbm(brms::bf(y ~ x1), data = data_fhnorm,
re = ~ (1 | regency), # area-level random effect
chains = 4, iter = 2000, warmup = 1000,
cores = 1, seed = 1, refresh = 0)
#> Compiling Stan program...
#> Error in .fun(model_code = .x1): Boost not found; call install.packages('BH')
s <- posterior_summary_hbm(model)
#> Error: object 'model' not found
s$fixed_effects
#> Error in s$fixed_effects: object of type 'closure' is not subsettable
# }