extract_fit: extract_fit

View source: R/extract_fit.R

extract_fitR Documentation

extract_fit

Description

Wrapper function to extract parameter draws from two common Stan interfaces. This function requires the respective stan interface (rstan, brms) package to be installed.

Usage

extract_fit(fit, parameter_name)

Arguments

fit

A fitted Stan model object (stanfit, brmsfit).

parameter_name

A character string of parameter name

Value

A data frame with one row per MCMC draw and one column per parameter. If multiple parameters, columns are named after the parameter.

Examples

# Not run:
# fit <- brms::brm(count ~ zAge + zBase * Trt + (1|patient),
#             data = brms::epilepsy[1:30,], family = poisson())

# posterior <- extract_stan_fit(fit, "b_Intercept")
# End(Not run)

BayesVolcano documentation built on March 31, 2026, 5:06 p.m.