Convenience constructor that calls new_hbmfit then
validate_hbmfit – the safe public entry-point if you
ever need to build an hbmfit object manually (e.g.\ when
adapting a non-brms model). In normal usage you do not
need to call this: hbm and the distribution-specific
wrappers do it for you.
Examples
# \donttest{
# Uses brms-default MCMC settings (chains = 4, iter = 2000,
# warmup = 1000) -- this toy data is only for verifying the
# hbmfit class structure, not for inference.
raw <- brms::brm(y ~ x1, data = data.frame(y = rnorm(10), x1 = 1:10),
chains = 4, iter = 2000, warmup = 1000, refresh = 0)
#> Compiling Stan program...
#> Start sampling
fit <- hbmfit(model = raw,
data = data.frame(y = rnorm(10), x1 = 1:10),
missing_method = NULL)
validate_hbmfit(fit)
# }