Bayesian analysis

Gist

General guide on how to do Bayesian analysis.

Workflows

For general data analysis

Martin et al. [1] suggested this Bayesian workflow for data analysis.
Pasted image 20260808163525.png

Directly copied from their book, but I like this list of questions one should ask when they are going to make a Bayesian model.

  1. (Likelihood) What distribution describes the observed data given X?
  2. (Covariates) What is the structure of the latent data generating process?
  3. (Ignorability) Do we need to model the data collection process?
  4. (Priors) Before seeing any data what is a reasonable set of parameters?
  5. Can I express my model in a Probabilistic Programming framework?
  6. Can we estimate the posterior distributions in a reasonable amount of time?
  7. Does the posterior computation show any deficiencies?
  8. Does the prior make sense in the context of math?
  9. Does the prior make sense in the context of the domain?
  10. Can our inference engine produce a posterior with the chosen prior?

For SIR modeling

This is the suggested workflow for modeling disease transmission using Model - SIR with Stan. But I think this workflow is generalizable to other analyses [2]

Pasted image 20260801221100.png

  1. **Criticize model before looking at data

    • Prior predictive check: We want priors that allow for every reasonable configuration of the data but exclude patently absurd scenarios, per our domain expertise.

Methodology


  1. Osvaldo A. Martin, Ravin Kumar, Junpeng Lao. “Bayesian Modeling and Computation in Python” ↩︎

  2. Grinsztajn, Léo, et al. "Bayesian workflow for disease transmission modeling in Stan." Statistics in medicine 40.27 (2021): 6209-6234. ↩︎