Introduction to Bayesian statistics with brms and the tidyverse


ONLINE, 20-24 March 2023


We are entering the Golden Age of Bayesian statistics. Thanks to fast personal computers and powerful free software (e.g., Stan), working scientists can fit an array of Bayesian models tailored to their specific needs. Recent textbooks from authors like McElreath (2015, 2020) have also made Bayesian methods more accessible to applied researchers with minimal backgrounds in mathematics. However, many graduate programs still do not offer introductory courses on Bayesian statistics. To help fill that pedagogical gap, this course is designed to provide an accessible and applied introduction to Bayesian data analysis for a wide variety of linear models using user-friendly brms R package.


We assume familiarity with R, regression, and the Generalized Linear Model (e.g., logistic regression, Poisson regression). Participants will benefit most if they have some experience with multilevel models. No knowledge of calculus or linear algebra is assumed, but basic school level mathematics knowledge is assumed. Most of the R code will follow the tidyverse style .



After completing this course, the participants will:

1. have become familiar with the basics of Bayesian inference,

2. be able to fit a range of regression models with several likelihood functions,

3. be able fit several robust models and distributional models,

4. know how to select priors for their models using prior predictive checks,

5. know how to assess the descriptive accuracy of a model using posterior predictive checks, and

6. know how to express their posterior distributions as effect sizes and informative figures.


As background reading, we recommend:


This course will draw from several introductory textbooks, such as:

Gelman et al (2020), Kruschke (2015), McElreath (2015, 2020), and Nicenboim et al (2022).

Kurz have released several free ebooks which translate other textbooks into brms and tidyverse-style code, which you can find here.

For a conceptual introduction to Bayesian data analysis, check out the 2-hour lecture by McElreath, “Bayesian Inference is Just Counting,”.

For basic R programming with tidyverse methods, we recommend the free ebook by Grolemund & Wickham (2017).

For introductions to the brms package, we recommend the reference manual and the several vignettes listed on the brms CRAN page.



Monday- 2-8 pm Berlin time

Basic data wangling
Exploratory data analysis
Simple linear regression with lm()
Simple linear regression with brm() (default priors)
Point estimate and SE versus posterior distribution
Correlations among parameters (vcov(), plot posterior fitted lines)
conditional_effects(), fitted(), predict() (lm() and brm())

Tuesday - 2-8 pm Berlin time

Bayes’ theorem
Weakly-informative priors
Moderately-informative priors
Prior-predictive checks (by hand and via sample_prior = "only")
Chain diagnostics (Rhat, ESS)
Interaction/moderation models
Effect sizes (standardized coefficients, Cohen’s d, Bayesian R2)
Information criteria (WAIC and LOO-CV)

Wednesday- 2-8 pm Berlin time
Location & scale models
Robust Student-t regression
Missing data (one-step imputation with mi() and multiple imputation with mice())
GLM and link functions
Binomial models (aggregated and unaggregated)
Effect sizes (odds ratios and probability contrasts)

Thursday- 2-8 pm Berlin time 
Poisson/NB models
Effect sizes (mean ratios and contrasts)
Further differentiation among a) posterior linear prediction, b) posterior expectation prediction, and c) posterior prediction
Ordinal regression (?)

Friday - 2-8 pm Berlin time
Multilevel models (Gaussian and otherwise)
Multilevel growth models
The multilevel ANOVA
Multilevel models for experiments with many conditions
Divergent transitions and small groups


COst overview

Package 1

480 €

Cancellation Policy:




> 30  days before the start date = 30% cancellation fee


< 30 days before the start date= No Refund.




Physalia-courses cannot be held responsible for any travel fees, accommodation or other expenses incurred to you as a result of the cancellation.