15
1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1 , M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy, Kaohsiung Veteran General Hospital 2 College of Pharmacy, Kaohsiung Medical University Kaohsiung, Taiwan

1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

Embed Size (px)

Citation preview

Page 1: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

1

Develop a Tool for Therapeutic Drug Monitoring

in R Using OpenBUGS

Speaker: Miao-ting Chen1, M.S.Mentor: Yung-jin Lee2

1 Department of Hospital Pharmacy, Kaohsiung Veteran General Hospital2 College of Pharmacy, Kaohsiung Medical UniversityKaohsiung, Taiwan

Page 2: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

2

Therapeutic Drug Monitoring (TDM)

To optimize individual patient’s drug therapy through monitoring its serum concentrations of the target drugs, as well as the observed clinical responseObservation estimate PK/PD parameters

dosage adjustment

Page 3: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

3

BUGS

posterior distribution

prior distributionlikelihood

The BUGS (Bayesian inference Using Gibbs Sampling): Bayesian analysis of complex statistical models using Markov chain Monte Carlo (MCMC) methods

priorlikelihood

posterior

Page 4: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

4

model {

for (i in 1:N) { INR[i]~dnorm(mu[i],1.0E+6) mu[i]<-pow(a[i],(1/0.383)) a[i]<-((1/((m[i]*(cl_F[i]/v_F[i]))/(pow(kc[i],2))*(1-

(kc[i]*tau[i]/(1-exp(kc[i]*tau[i]))))m[i]/kc[i]*log ((D[i]/v_F[i])/(Cpmax[i]*(1-exp(cl_F[i]/v_F[i]*tau[i] )))))+3.36)/4.368)

m[i]~dgamma(0.1,0.1) Cpmax[i]~dgamma(0.1,0.1) kc[i]~dgamma(0.1,0.1) cl_F[i]~dgamma(0.1,0.1) v_F[i]~dnorm(7.5,100) }}

Bayesian PK Hierarchical Model (using warfarin as the example)

likelihood

Prior distribution

Page 5: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

5

OpenBUGS

Required programs or R packages

BRugs

Page 6: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

6

Setting steps

PK model

modelcheck(“modelname.txt”)modeldata(“dataname.txt”)modelCompile(numChains=1)modelGenInits( ) modelUpdate(10000) samplesSet(c("ka","cl_F")) modelUpdate(10000)

show(samplesStats("*")) samplesHistory("*",mfrow=c(3,1), ask = FALSE)samplesDensity("*", mfrow = c(3, 2), ask = FALSE)samplesAutoC("*",1, mfrow = c(3, 2), ask = FALSE

bugsData( …….),fileName=file.path(getwd(),“modelname.txt"),digits=5)

Page 7: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

7

The ability of the tdm package estimate

PE (Prediction Error, %) = (Eq.1)

P pr= predicted value

P true= true values

Convergence of MCMC chain (history, density and autocorrelation plots)

Validation

Page 8: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

8

tdm Menu driven UI

16 PK & 1 PD modelsmost steady-state (ss)

Four data typessingle subject & one conc.

single subject & multiple conc.

many subjects & one conc.

many subjects & multiple different conc.

Convergence plots

Dose adjustment

Menu Aminoglycoside Carbamazepine Digoxin Lithium Lithium carbonate Lithium citrate Theophylline salt Aminophylline anhydrous Aminophylline dihydrous Oxtriphylline Theophylline Phenytoin Valproate Vancomycin Anti-HIV Enfuvirtide Indinavir Ritonavir Immunosuppressant Cyclosporine-A Everolimus Tacrolimus Enoxaparin Imatinib mesylate Warfarin

History plot

Auto-correlation plot

Density plot

Page 9: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

9

Comparison Between tdm and JPKD

Prediction error (%) of PK parameters were similar to those using nonlinear regression (empirical Bayesian) obtained from JPKD (Java PK For Desktop).

Page 10: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

10

Convergence

Low PE(%) is not necessarily imply that Markov chains converge successfully.Also, successful convergence of Markov chains do not necessarily result in low PE(%).In setting of tdm, we did not increase updating for convergence.

Page 11: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

11

Limitation of tdm

Currently tdm is only available for Windows platform computer (BRugs and OpenBUGS are now only available for Windows) .

ODE equation can not currently be used to define model in tdm.

Page 12: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

12

tdm website: http://pkpd.kmu.edu.tw/tdm

Page 13: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

Acknowledge• Chun-ying Lee (Changhua Christian Hospital, Changhua,

Taiwan): package building and environment setting

• Uwe Ligges (Fakultät Statistik, Technische Universität Dortmund, Dortmund, Germany): coding and compiling (by e-mail)

• Kurt Hornik (Department of Statistics and Mathematics of the Wirtschaftsuniversität Wien, Austria): coding and compiling (by e-mail)

• Kaohsiung Veteran General Hospital and Dr. Cheng DL Medical Research Foundation, Kaohsiung, Taiwan: sponsoring this trip

Page 14: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

14

ReferencesYamaoka K, et al., A nonlinear multiple regression program, MULTI2 (BAYES), based on Bayesian algorithm for microcomputers. Journal of Pharmacobio-Dynamic 1985;8: 246-56. Application of Bayesian Estimation to a Two compartment Model in PK/PDOpenBUGS website: http://mathstat.helsinki.fi/openbugs/Home.htmlR website: www.r-project.org

Page 15: 1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,

15

Thanks for your attention