Advanced use of Stan, rstan, and Torsten for pharmacometric applications




Sat, June 10, 2017
8:30 AM – 4:30 PM CEST
Budapest Congress Centre
Jagelló út 1-3
Budapest, Hungary


Workshop summary: We will provide a guided hands-on experience in the advanced use of Stan, rstan and Torsten for Bayesian PKPD modeling. Stan is a flexible open-source software tool for Bayesian data analysis using Hamiltonian Monte Carlo (HMC) simulation---a type of MCMC simulation. Torsten is a Stan extension containing a library of functions to simplify implementation of PKPD models. This workshop builds on the foundations presented in our previous introductory Stan workshops. Topics include model evaluation and comparison, models with systems of ODEs, optimizing Stan code, using MCMC results for populatin and trial simulations, and more. You will execute Bayesian data analysis examples using Stan. Via the examples you will learn to implement population PKPD models including those involving censoring, numerical solution of ODEs, and user-defined probability distributions and likelihoods.

Requirements for Attendees

Knowledge and experience in population PKPD modeling and the use of R and Stan. The workshop assumes a knowledge of Stan comparable to the content of our previous introductory workshops. For those who do not yet have the required knowledge of Stan we will offer a recorded online version of an introductory workshop prior to PAGE 2017.

Materials Provided by Metrum

Course slides, data and code for all examples, online access for one week to a cloud-based compute server on which the software used in the course is installed.

Course will be led by Metrum's Bill Gillespie, Ph.D., and Charles Margossian.

Workshop Outline

  • Brief review of the use of Stan and rstan
    • User-defined functions
    • Implementing popPKPD models
    • Modeling workflow using rstan
  • Models with systems of ODEs
    • Linear case
    • General case
  • Torsten: Prototype library of PKPD functions for Stan
    • Built-in models: 1 and 2 compartment models with 1st order absorption
    • Numerical solution of user-specified ODEs
  • Hands-on example 1: popPK using a 2 compartment model with 1st order absorption
  • Review of HMC/NUTS
  • Diagnosing and remedying sampling problems encountered w/Stan
  • Optimizing Stan code
    • Parameterization, e.g., centered vs non-centered parameterizations for hierarchical models
    • Constructing/choosing prior distributions
  • Hands-on example 2: popPKPD using a model based on a linear system of ODEs
  • Model evaluation and comparison
  • Use of informative prior distributions in pharmacometrics applications
  • Using MCMC results for statistical inference
    • Population and trial simulations based on MCMC results
  • Hands-on example 3: physiologically-based popPKPD model Censoring
  • User-defined probability distributions and likelihoods
  • Mixture models
  • Hands-on example 4: parametric time-to-event model
  • What didn’t we cover