Bayesian analysis

Gist

Basically, what is the general workflow for Bayesian analysis?

Where I used it

When I was a postdoctoral scholar at Cornell University. I had to see if there was a phylogenetic signal in malaria species. I used {brms} (see Bayesian software). It was my first time doing anything with Bayesian stats. I remember my friend Spencer who kept telling me to become a Bayesian when we were in graduate school. I was like “No way man!”

But then when I entered big pharma, one of the first papers I was asked to read was the Bayesian guidance by the FDA. So there seems to be a bigger push for using Bayesian statistics. Specifically, historical borrowing seems to be the biggest perk of becoming a Bayesian.

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, specifically

This is the suggested workflow for modeling disease transmission using SIR Model (General) 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. ↩︎