Skip to content

Bayesian Inference with Stan for Pharmacometrics Class

Bob Carpenter, Daniel Lee, and Michael Betancourt will be teaching the 3-day class starting on 19 September in Paris. Following is the outline for the course:

Day 1

Introduction to Bayesian statistics

  • Likelihood / sampling distributions
  • Priors, Posteriors via Bayes’s rule
  • Posterior expectations and quantiles
  • Events as expectations of indicator functions

Introduction to Stan

  • Basic data types
  • Variable declarations
  • Constrained parameters and transforms to unconstrained
  • Program blocks and execution
  • Derived quantities
  • Built-in functions and operators
  • Statements: sampling, assignment, loops, conditionals, blocks
  • How to use Stan within R with RStan

Hands-on examples

Day 2

ODE and PK/PD Modeling

  • Parameters and data to ODEs
  • Non-stiff ODE solver
  • Stiff ODE solver
  • Control parameters and tolerances
  • Coupled ODE systems for sensitivities
  • Elimination half-lifes

Inference with Markov chain Monte Carlo

  • Monte Carlo methods and plug-in inference
  • Markov chain Monte Carlo
  • Convergence diagnostics, R-hat, effective sample size
  • Effective sample size vs. number of iterations
  • Plug-in posterior expectations and quantiles
  • Event probability calculations

Hands-on examples

Day 3

Additional Topics in PK/PD Modeliong

  • Bolus and infusion dosing
  • Lag time and absorption models
  • Linear versus Michaelis/Menten elimination
  • Hierarchical models for patient-level effects
  • Transit compartment models and time lags
  • Multi-compartment models and varying time scales
  • Joint PK/PD modeling: Bayes vs. “cut”
  • Meta-analysis
  • Formulating informative priors
  • Clinical trial simulations and power calculations

Stan programming techniques

  • Reproducible research practices
  • Probabilistic programming principles
  • Generated quantities for inference
  • Data simulation and model checking
  • Posterior predictive checks
  • Cross-validation and predictive calibration
  • Variable transforms for sampling efficiency
  • Multiple indexing and range slicing
  • Marginalizing discrete parameters
  • Handling missing data
  • Ragged and aparse data structures
  • Identifiability and problematic posteriors
  • Weakly informative priors

If you are in Europe in September, please come and join us. Thanks to Julie Bertrand and France Mentré from Université Paris Diderot for helping us organize the course.

You can register here.


  1. numeric says:

    Will slides be posted for this course, or will that be proprietary?

  2. Shravan says:

    I’m signed up for this. I don’t know anything about pharmacometrics, but I look forward to learning about it. You folks should have more such courses in western Europe. If I had money I’d invite you over to Potsdam.

    • Eric Novik says:

      I think most of us love to travel, so yes this would be great although it makes it harder for us to organize as we do not have a permanent presence in Europe. If anyone local wants to collaborate with us, let me know.

  3. Beyhan GUL says:

    Are you planning to offer it on Internet ?

Leave a Reply