fit <- stan_glm(mpg ~ wt + as.factor(cyl), data = mtcars)
as_draws_matrix(fit) # matrix format combines all chains
as_draws_df(fit, regex_pars = "cyl")
posterior::summarize_draws(as_draws_array(fit))
Run the code above in your browser using DataLab