# NOT RUN {
fit <- brm(count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy, family = poisson())
# extract posterior draws in an array format
(draws_fit <- as_draws_array(fit))
posterior::summarize_draws(draws_fit)
# extract only certain variables
as_draws_array(fit, variable = "r_patient")
as_draws_array(fit, variable = "^b_", regex = TRUE)
# extract posterior draws in a random variables format
as_draws_rvars(fit)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab