Fitting Complex PK/PD Models with Stan

Similar documents
Contents. Part I: Fundamentals of Bayesian Inference 1

Bayesian Inference and MCMC

Tutorial on Probabilistic Programming with PyMC3

Bayesian Methods for Machine Learning

Understanding Automatic Differentiation to Improve Performance

Sequential Monte Carlo Methods for Bayesian Computation

The Particle Filter. PD Dr. Rudolph Triebel Computer Vision Group. Machine Learning for Computer Vision

STA 4273H: Statistical Machine Learning

Machine Learning. Probabilistic KNN.

STA 4273H: Sta-s-cal Machine Learning

Hierarchical Bayesian Modeling

(5) Multi-parameter models - Gibbs sampling. ST440/540: Applied Bayesian Analysis

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Computer Vision Group Prof. Daniel Cremers. 14. Sampling Methods

Probabilistic Machine Learning

Hamiltonian Monte Carlo

Markov Chain Monte Carlo, Numerical Integration

17 : Optimization and Monte Carlo Methods

Example: Ground Motion Attenuation

DAG models and Markov Chain Monte Carlo methods a short overview

Bayesian Inference: Probit and Linear Probability Models

Closed-form Gibbs Sampling for Graphical Models with Algebraic constraints. Hadi Mohasel Afshar Scott Sanner Christfried Webers

Bayesian Estimation of Input Output Tables for Russia

Parameter Estimation. William H. Jefferys University of Texas at Austin Parameter Estimation 7/26/05 1

Bayesian course - problem set 6 (lecture 7)

Bayesian Regression Linear and Logistic Regression

Lecture 13 Fundamentals of Bayesian Inference

Bayesian inference for multivariate extreme value distributions

Default Priors and Effcient Posterior Computation in Bayesian

Hierarchical expectation propagation for Bayesian aggregation of average data

Bagging During Markov Chain Monte Carlo for Smoother Predictions

BAYESIAN METHODS FOR VARIABLE SELECTION WITH APPLICATIONS TO HIGH-DIMENSIONAL DATA

Metropolis Hastings. Rebecca C. Steorts Bayesian Methods and Modern Statistics: STA 360/601. Module 9

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Bayesian Phylogenetics:

Bayesian Inference for Discretely Sampled Diffusion Processes: A New MCMC Based Approach to Inference

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods

Introduction to Bayesian Statistics 1

Markov Chain Monte Carlo methods

Lecture 8: Bayesian Estimation of Parameters in State Space Models

Sequential Monte Carlo Methods for Bayesian Model Selection in Positron Emission Tomography

Development of Stochastic Artificial Neural Networks for Hydrological Prediction

The Bayesian Choice. Christian P. Robert. From Decision-Theoretic Foundations to Computational Implementation. Second Edition.

Computer Vision Group Prof. Daniel Cremers. 10a. Markov Chain Monte Carlo

Introduction to Machine Learning

Forward Problems and their Inverse Solutions

Machine Learning Techniques for Computer Vision

Markov Chain Monte Carlo

MCMC and Gibbs Sampling. Kayhan Batmanghelich

Markov Chain Monte Carlo

Markov Chain Monte Carlo. Simulated Annealing.

Bayesian Inference in GLMs. Frequentists typically base inferences on MLEs, asymptotic confidence

Control Variates for Markov Chain Monte Carlo

Mixture modelling of recurrent event times with long-term survivors: Analysis of Hutterite birth intervals. John W. Mac McDonald & Alessandro Rosina

CS242: Probabilistic Graphical Models Lecture 7B: Markov Chain Monte Carlo & Gibbs Sampling

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods: Markov Chain Monte Carlo

Chapter 12 PAWL-Forced Simulated Tempering

Bayesian Inference for DSGE Models. Lawrence J. Christiano

MONTE CARLO METHODS. Hedibert Freitas Lopes

Monte Carlo in Bayesian Statistics

STA414/2104 Statistical Methods for Machine Learning II

17 : Markov Chain Monte Carlo

Organization. I MCMC discussion. I project talks. I Lecture.

Characterizing Travel Time Reliability and Passenger Path Choice in a Metro Network

Notes on pseudo-marginal methods, variational Bayes and ABC

Introduction to Bayesian Statistics and Markov Chain Monte Carlo Estimation. EPSY 905: Multivariate Analysis Spring 2016 Lecture #10: April 6, 2016

MIT /30 Gelman, Carpenter, Hoffman, Guo, Goodrich, Lee,... Stan for Bayesian data analysis

Pattern Recognition and Machine Learning

Markov Chain Monte Carlo (MCMC) and Model Evaluation. August 15, 2017

VCMC: Variational Consensus Monte Carlo

Bayesian networks: approximate inference

Large Scale Bayesian Inference


eqr094: Hierarchical MCMC for Bayesian System Reliability

Multiple Scenario Inversion of Reflection Seismic Prestack Data

Statistical Estimation of the Parameters of a PDE

Approximate Inference using MCMC

Chapter 2. Data Analysis

ST 740: Markov Chain Monte Carlo

Part 7: Hierarchical Modeling

Bayesian modelling. Hans-Peter Helfrich. University of Bonn. Theodor-Brinkmann-Graduate School

Petr Volf. Model for Difference of Two Series of Poisson-like Count Data

Solar Spectral Analyses with Uncertainties in Atomic Physical Models

April 20th, Advanced Topics in Machine Learning California Institute of Technology. Markov Chain Monte Carlo for Machine Learning

Notes on Noise Contrastive Estimation (NCE)

Multilevel Statistical Models: 3 rd edition, 2003 Contents

Modelling and forecasting of offshore wind power fluctuations with Markov-Switching models

Inversion Base Height. Daggot Pressure Gradient Visibility (miles)

Towards a Bayesian model for Cyber Security

Bayesian Graphical Models

Statistical Inference for Stochastic Epidemic Models

MCMC notes by Mark Holder

Bayesian Model Comparison:

CS281A/Stat241A Lecture 22

MCMC: Markov Chain Monte Carlo

Exploring Monte Carlo Methods

arxiv: v1 [stat.co] 23 Apr 2018

Application of new Monte Carlo method for inversion of prestack seismic data. Yang Xue Advisor: Dr. Mrinal K. Sen

MCMC algorithms for fitting Bayesian models

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Transcription:

Fitting Complex PK/PD Models with Stan Michael Betancourt @betanalpha, @mcmc_stan University of Warwick Bayes Pharma Novartis Basel Campus May 20, 2015

Because of the clinical applications, precise PK/PD modeling is incredibly important. PK/PD Model

Because of the clinical applications, precise PK/PD modeling is incredibly important. PK/PD Model Treatment R(T, )!

Robust treatment decisions requires modeling both the latent PK/PD process and the measurement. PK/PD Model Treatment R(T, )!

Robust treatment decisions requires modeling both the latent PK/PD process and the measurement. PK/PD Model Data D Treatment R(T, )!

Robust treatment decisions requires modeling both the latent PK/PD process and the measurement. PK/PD Model Measurement Model (D ) Data D Treatment R(T, )!

Analytic models are common due to their computational convenience but ultimately too restrictive. PK/PD Model Measurement Model (D ) Data D Treatment R(T, )!

Analytic PK/PD models, for example, are exactly solvable. PK/PD Model Measurement Model (D ) Data D Treatment R(T, )!

Analytic PK/PD models, for example, are exactly solvable. dc dt = V m V C K m + C

These analytic models, however, can t capture many nonlinear effects in more realistic PK/PD systems. dc dt = V m V C K m + C + k V e kt

Similarly, analytic measurement models are straightforward to fit. PK/PD Model Measurement Model (D ) Data D Treatment R(T, )!

Similarly, analytic measurement models are straightforward to fit. bc t,n (V,V m )=N (C(t, V, V m ), )

Similarly, analytic measurement models are straightforward to fit. bc t,n (V,V m )=N (C(t, V, V m ), ) NX C(t, V, V m ) 1 N Ĉ t,n (V,V m ) n=1

Similarly, analytic measurement models are straightforward to fit. bc t,n (V,V m )=N (C(t, V, V m ), ) NX C(t, V, V m ) 1 N Ĉ t,n (V,V m ) V,V m C 1 1 N n=1 NX n=1 Ĉ t,n (V,V m )!

But for population data analytic measurement models either introduce bias or suffer from large uncertainties. dc dt = V m V C K m + C

But for population data analytic measurement models either introduce bias or suffer from large uncertainties. dc dt = V n m V n C K m + C

But for population data analytic measurement models either introduce bias or suffer from large uncertainties. dc dt = V m n V n C K m + C

But for population data analytic measurement models either introduce bias or suffer from large uncertainties. V 1,V 1 m V n,v n m V N,V N m......

If we want to maximize the utility of the data then we need non-analytic measurement models. V 1,V 1 m V n,v n m V N,V N m...... µ V,! V µ Vm,! Vm V n log N (µ V,! V ) V n m log N (µ Vm,! Vm )

Non-analytic models are practically difficult because they are computationally demanding to fit. PK/PD Model Measurement Model (D ) Data D Treatment R(T, )!

Recall that in Bayesian inference our complete model is specified with a posterior distribution.

Recall that in Bayesian inference our complete model is specified with a posterior distribution. ( )

Recall that in Bayesian inference our complete model is specified with a posterior distribution. (D ) ( )

Recall that in Bayesian inference our complete model is specified with a posterior distribution. ( D) / (D ) ( )

And all well-posed statistical manipulations are expectations with respect to the posterior. Z E[f] = d ( D)f( )

Expectations, however, are computationally demanding when the model is complex. Z E[f] = d ( D)f( )

The problem is that probability concentrates on a nonlinear surface called the typical set.

In order to estimate expectations we can use Markov chain Monte Carlo to find and explore the typical set.

In order to estimate expectations we can use Markov chain Monte Carlo to find and explore the typical set.

Given the complexity of the PK/PD model, this exploration has to be extremely efficient to be practical.

Random Walk Metropolis explores with an ineffective guided diffusion.

Random Walk Metropolis explores with an ineffective guided diffusion.

Random Walk Metropolis explores with an ineffective guided diffusion.

The Gibbs sampler updates each parameter one-at-a-time to no greater success.

The Gibbs sampler updates each parameter one-at-a-time to no greater success.

In order to explore efficiently we need coherent exploration.

In order to explore efficiently we need coherent exploration.

Modeling Language

Modeling Language Hamiltonian Monte Carlo

Modeling Language Hamiltonian Monte Carlo

A strongly typed modeling language allows users to specify complex models with minimal effort.

Stan not only admits the specification of a system of ordinary differential equations functions { real[] onecomp_mm_infusion(real t, real[] y, real[] theta, real[] x_r, int[] x_i) {! real dydt[1];! if (t < x_r[2]) dydt[1] <- - theta[2] * y[1] / ( theta[1] * (theta[3] + y[1]) ) + x_r[1] / (theta[1] * x_r[2]); else dydt[1] <- - theta[2] * y[1] / ( theta[1] * (theta[3] + y[1]) );! return dydt;! } }

But also high-performance integrators. transformed parameters { for (p in 1:N_patients) { V[p] <- exp(mu_v + eta_v[p] * omega_v); V_m[p] <- exp(mu_v_m + eta_v_m[p] * omega_v_m);! } theta[1] <- V[p]; theta[2] <- V_m[p]; theta[3] <- K_m; C <- integrate_ode(onecomp_mm_infusion, C0, t0, t, theta, x_r, x_i);

Consequently, even complex statistical modeling of PK/PD systems is straightforward in Stan. model { eta_v ~ normal(0, 1); mu_v ~ normal(log(5), 1); sigma_v ~ cauchy(0, 1); eta_v_m ~ normal(0, 1); mu_v_m ~ cauchy(0, 1); sigma_v_m ~ cauchy(0, 1);! } K_m ~ cauchy(0, 1); for (p in 1:N_patients) for (n in 1:N_t) C_hat[p, n] ~ lognormal(log(c[p, n]), 0.15);

Modeling Language Hamiltonian Monte Carlo

Once a posterior has been specified, Stan implements Hamiltonian Monte Carlo to estimate expectations.

Let s consider a one-compartment Michaelis-Menten clearance model with a constant infusion. dc dt = V m V C K m + C + I(t) I(t) = 8 < : D VT, 0, t apple 0 0 <t<t 0, T apple t

Data is simulated for ten patients, with each patient given their own V and V m. dc n dt = V n m V n C n K m + C n + I(t) Ĉ n (t) log N (C n (t), )

Data is simulated for ten patients, with each patient given their own V and V m. dc n dt = V n m V n C n K m + C n + I(t) Ĉ n (t) log N (C n (t), ) V n log N (µ V,! V ) V n m log N (µ Vm,! Vm )

Within a few minutes Stan generates all of the samples we need to infer the individual patient concentrations. 3 2.5 Concentration(mg/L) 2 1.5 1 0.5 0 0.1 1 10 Time(days)

As well as simulated data for constructing posterior predictive checks. 3 2.5 Concentration(mg/L) 2 1.5 1 0.5 0 0.1 1 10 Time(days)

We can also analyze the system parameters for each individual patient. 4.8 5 5.2 5.4 5.6 5.8 6 6.2 6.4 V(L)

As well as the population parameters. 4 5 6 7 8 9 µ V (L) 0.2 0.4 0.6 0.8 1 1.2 V (L)

As well as the population parameters. 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 µ Vm (mg/day) 0.2 0.4 0.6 0.8 1 1.2 1.4 Vm (mg/day)