Title: WinBugs with some PK examples
1WinBugs with some PK examples
- Peter Blood
- CP-Bios
- Novartis Horsham Research Centre
2Examples
- IV dose
- Cadralazine
- Oral 1 compartment
- Theophylline
3A Simple Hierarchical Structure
4IV - Cadralazine
- Taken IV by patients for cardiac failure
- Data consisted of 10 patients on 30mg
- Original Bayesian analysis by Wakefield,
Racine-Poon et al - (Applied Statistics 43,No 1, pp201-221,1994)
- Analysed in BUGS with a linearised model
- See version 0.6 manual addendum
- Can now be analysed with nonlinear Model in
PkBUGS - Will consider a non-linear model with winBUGS
5Cadralazine Data (from Wakefield et al)
6IV Cadralazine Equation
7Cadralazine Models
- Analysed in BUGS v0.6 as product formulation of
the bivariate nomal - Log V N(ua, ?a) I (La,Ua)
- Log Cl log V N(k0k1(Log V - c), ?b) I(Lb,Ub)
- Could now analyse in winBUGS 1.3 as multivariate
- muab 12 dmnorm(mean12, prec12,12)
- tauab12,12 dwish(R12, 12,2)
- Could now use PKBUGS (see David Lunns example)
8Cadralazine Doodle
9Cadralazine Results
Mean (sd) BUGS 0.6 winBUGS PKBUGS
p.lgcl 1.051(0.147) 1.061 (0.131) 1.054 (0.129)
p.lgvol 2.838 (0.072) 2.669 (0.043) 2.683 (0.056)
tauC - 285.9 (52.96) 232.8 (51.18)
sigma - 0.060 (0.006) 0.066 (0.007)
10Theophylline Example
- Bronchodilator (methyl xanthine)
- Kinetics of drugs anti-asthmatic properties
- 12 Subjects measured 11 times over 25 hours
- Oral first order one compartment model
- First Analysed by Sheiner and Beal with NONMEM
- Also by Pinherio and Bates in S using NLME
- And in SAS using proc NLMIXED
11References on Theophylline
- Davidian Giltinan 1995
- Non linear Models for Repeated
- Measurement Data, pub Chapman Hall.
- Pinheiro Bates (1995)
- Analysed in SAS (Proc Nlmixed)
- Reanalysed in SPLUS (NLME)
- Boeckman, Sheiner Beal 1992
- (Nonmem Users Guide Part V)
- Created with Body weight as a Cl covariate
- Absorption assumed same for all subjects
- 1 Compartment model
- Volume in L/kg, Clearance in L/hr/kg
12Theophylline Example 12 adults from NONMEM file
13Theophylline Example
14Open Oral Model for Theophylline
15Theophylline Central Code
- for(i in 1nSUBJ)
- for(j in 1nTIME)
- mui,j lt- Doseiexp(logka)
- (exp((-Timei,j)exp(lgcli-lgvol
i)) - - exp((-Timei,j)exp(logka)))
- /(exp(lgvolilogka)-exp(lgcli))
- Conci,j dnorm(mui,j, epsilon)
- end of j time loop
- end of i subject loop
- Conci,j dt(mui,j,epsilon,4)
16Prior Information
- phi dnorm(-3.5, 500) log(Cl)
- theta dnorm(-1,100000) log(V)
- logka dnorm( 0.5, 150)
- eta1 dgamma(40, 1) inter
- eta2 dgamma(12, 3) inter
- epsilon dgamma(0.001,0.001) intra
- for(i in 1nSUBJ)
- lgcli dnorm(phi,eta1)
- lgvoli dnorm(theta,eta2)
-
17Initial Conditions (1st)
- 1st set of initial start conditions
- list(phi -4.0,
- theta -1.5,
- logka 0.3,
- eta1 24,
- eta2 2,
- epsilon 0.7,
- lgcl c(-4.0,-4.0,-4.0,-4.0,-4.0,-4.0,
- -4.0,-4.0,-4.0,-4.0,-4.0,-4.0),
- lgvol c(-1.5,-1.5,-1.5,-1.5,-1.5,-1.5,
- -1.5,-1.5,-1.5,-1.5,-1.5,-1.5)
- )
18Data Collection Posterior Statistics
- for(i in 1nSUBJ)
- Dosei lt- Zi,1,4
- for(j in 1nTIME)
- Timei,j lt- Zi,j,5
- Conci,j lt- Zi,j,6
- lgcl.mn lt- mean(lgcl)
- lgvol.mn lt- mean(lgvol)
- mnCl lt- exp(lgcl.mn)
- mnVol lt- exp(lgvol.mn)
- Sigma lt- 1.0/sqrt(epsilon)
- for(i in 1nSUBJ)
- Cli lt- exp(lgcli)
- Voli lt- exp(lgvoli)
19Theophylline Data-1st Subject
- list(nSUBJ 12, nTIME 11,
- Z structure(
- .Datac(
- 1, 1, 79.60, 4.02, 0.00, 0.74,
- 2, 1, 79.60, 4.02, 0.25, 2.84,
- 3, 1, 79.60, 4.02, 0.57, 6.57,
- 4, 1, 79.60, 4.02, 1.12,10.50,
- 5, 1, 79.60, 4.02, 2.02, 9.66,
- 6, 1, 79.60, 4.02, 3.82, 8.58,
- 7, 1, 79.60, 4.02, 5.10, 8.36,
- 8, 1, 79.60, 4.02, 7.03, 7.47,
- 9, 1, 79.60, 4.02, 9.05, 6.89,
- 10, 1, 79.60, 4.02,12.12, 5.94,
- 11, 1, 79.60, 4.02,24.37, 3.28,
- ............
- 132,12, 60.50, 5.30,24.15, 1.17),
.Dimc(12,11,6)))
20Start of 2 chains for log(Cl) (Theophylline)
213rd Continuation of chains for log(Cl)(Theophylli
ne)
22History Chains (Theophylline)
23Results for Theophylline
- node mean sd MC err start sample
- epsilon 0.891 0.124 0.0016 4001 20000
- eta1 36.34 6.035 0.0672 4001 20000
- eta2 4.734 1.124 0.0085 4001 20000
- Lgcl.mn -3.352 0.045 0.0011 4001 20000
- Lgvol.mn -0.719 0.028 0.0007 4001 20000
- Logka 0.483 0.056 0.0013 4001 20000
- Phi -3.432 0.039 0.0006 4001 20000
- Theta -0.999 0.003 0.00002 4001 20000
- sigma 1.067 0.075 0.0009 4001 20000
24Geweke Cross-Correlation(chain 1)
Geweke (Z) Variable Lgcl.mn Lgvol.mn Phi Theta Sigma
0.608 Lgcl.mn 1.000
-1.500 Lgvol.mn -0.488 1.000
1.080 Phi 0.525 -0.252 1.000
-0.882 Theta 0.002 -0.013 -0.001 1.000
-0.611 Sigma -0.211 0.125 -0.102 0.005 1.000
25Multivariate Theophylline
- vague prior information
- muab12 dmnorm(mean12,precn12,12)
- tauab12,12 dwish(omega12,12,2)
- extra initial conditions
- list(
- mean c(0,0),
- precn structure(.Datac(1.0E-6,0,0,1.0E-.Dimc(
2,2)), - omega structure(.Datac(0.1,0,0,0.01),
.Dimc(2,2)))
26Results from Multi-variate Model (Theophylline)
- node mean sd MC err start sample
- epsilon 0.937 0.130 0.0018 4001 20000
- Logka 0.463 0.058 0.0014 4001 20000
- muab1 -3.259 0.102 0.0015 4001 20000
- muab2 -0.738 0.072 0.0009 4001 20000
- Sigma 1.041 0.073 0.0010 4001 20000
- tauab1,1 17.740 11.30 0.2633 4001 20000
- tauab1,2 -5.524 11.50 0.2628 4001 20000
- tauab2,1 -5.524 11.50 0.2628 4001 20000
- tauab2,2 32.080 21.60 0.4639 4001 20000
27Theophylline
Software Procedure RESULTS Log(ka) Log(V) LOG(Cl) LOG(Ke)
winBUGS M-H 0.482 -0.999 -3.432
NONMEM Taylor 0.456 -0.802 -3.160
S NLME 0.453 -0.782 -3.214
SAS NLMIXED 0.453 -0.795 -3.169
SAS NLMIXED 0.481 -3.227 -2.459
Davidian Giltian GTS 0.265 -0.795 -3.207
VC GLS 0.453 -0.748 -3.264
LB GLS 0.329 -0.789 -3.214
28Conclusions
- Run some examples of PK models in winBUGS.
- IV and Oral One compartment examples.
- Cadralazine and Theophylline
- Compared with results from other sources
- Looked at convergence issues in CODA
- Perhaps you should now try PKBUGS (28models)!
- Plea for further development of PKBUGS
29The End