| extract_fit | R Documentation |
Wrapper function to extract parameter draws from two common Stan interfaces. This function requires the respective stan interface (rstan, brms) package to be installed.
extract_fit(fit, parameter_name)
fit |
A fitted Stan model object (stanfit, brmsfit). |
parameter_name |
A character string of parameter name |
A data frame with one row per MCMC draw and one column per parameter. If multiple parameters, columns are named after the parameter.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.