Bayesian Linear Regression

Author
Affiliations

Peter Sørensen

Center for Quantitative Genetics and Genomics

Aarhus University

The following materials include theoretical notes, slides, and practical R examples for exploring Bayesian Linear Regression. It introduces both classical and Bayesian regression methods, showing how to estimate parameters, define priors, perform posterior inference via Gibbs sampling, and assess convergence - all through practical R code.

Explore the sections below to find the corresponding materials.


Overview of Materials

Section Description
Notes Theoretical notes on Bayesian linear regression, Gibbs sampling, and convergence diagnostics.
Slides Lecture slides summarizing key theoretical concepts and derivations.
Narrated slides Narrated lecture slides summarizing key theoretical concepts and derivations.
Classical Regression Simulation and estimation using ordinary least squares (OLS) in R.
Bayesian (Gaussian Prior) Bayesian regression with conjugate Gaussian priors and closed-form Gibbs sampling in R.
Bayesian (Spike & Slab) Bayesian regression with spike-and-slab priors for variable selection and sparsity in R.

Download Notes (PDF)
Download Slides (PDF)



Further Reading

Further details on the theory and computation behind Bayesian linear regression, Gibbs sampling, and hierarchical modeling can be found in
Sorensen, D. (2025). Statistical Learning in Genetics: An Introduction Using R. Springer.

This book provides a rigorous and accessible introduction to Bayesian modeling, hierarchical inference, and statistical learning methods in quantitative genetics and genomics.