Skip to contents

bmbeR takes regression models fitted with rstanarm::stan_glm() through a Bayesian workflow (Gelman et al., 2020) with the prior at the centre: it helps you choose priors, check what they imply, measure their influence, and report them. The prior tools also accept rstanarm::stan_glmer() fits.

The functions map onto the stages of the workflow:

StageFunctions
Specify priorsprior_spec(), prior_config(), empirical_bayes_priors(), prior_table()
Check priors before fittingprior_predictive_check()
Fit and check computationfit_model_with_prior(), check_convergence()
Quantify prior influenceprior_sensitivity(), sensitivity_analysis(), plot_prior_posterior(), as_priorsense_draws()
Visualisegenerate_plot(), plot_posterior_distributions()
Evaluate predictionsevaluate_model_performance(), compare_performance()
Reportworkflow_report()

Global options

bmbeR never changes global state (options, R's random number stream, or the ggplot2 theme). Functions that simulate take a seed argument instead. To run chains in parallel, set options(mc.cores = 4) (or parallel::detectCores()) yourself before fitting.

References

Gelman, A., Vehtari, A., Simpson, D., Margossian, C. C., Carpenter, B., Yao, Y., Kennedy, L., Gabry, J., Bürkner, P.-C., & Modrák, M. (2020). Bayesian workflow. arXiv:2011.01808. doi:10.48550/arXiv.2011.01808

Author

Maintainer: elkronos jchase.msu@gmail.com