13.07.2015 Views

Pros and Cons of Bayesian Pharmacometric Modeling Using BUGS

Pros and Cons of Bayesian Pharmacometric Modeling Using BUGS

Pros and Cons of Bayesian Pharmacometric Modeling Using BUGS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Pros</strong> <strong>and</strong> <strong>Cons</strong> <strong>of</strong> <strong>Bayesian</strong><strong>Pharmacometric</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong>William R GillespieMetrum InstituteAAPS Annual MeetingNovember 8–12, 2009c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 1 / 26


<strong>Bayesian</strong> modeling<strong>Bayesian</strong> modelingTwo distinguishing core notionsThe two core notions that distinguish <strong>Bayesian</strong> analysis are:1 Unknown quantities are represented as probability distributions,<strong>and</strong>2 A formal mechanism exists for combining prior knowledge <strong>and</strong>new data.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 2 / 26


<strong>Bayesian</strong> modeling<strong>Bayesian</strong> modelingTwo distinguishing core notionsThe two core notions that distinguish <strong>Bayesian</strong> analysis are:1 Unknown quantities are represented as probability distributions,<strong>and</strong>2 A formal mechanism exists for combining prior knowledge <strong>and</strong>new data.(1) provides for rigorous quantitative description <strong>of</strong> uncertainty inmodel parameters <strong>and</strong> predictions.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 2 / 26


<strong>Bayesian</strong> modeling<strong>Bayesian</strong> modelingTwo distinguishing core notionsThe two core notions that distinguish <strong>Bayesian</strong> analysis are:1 Unknown quantities are represented as probability distributions,<strong>and</strong>2 A formal mechanism exists for combining prior knowledge <strong>and</strong>new data.(1) provides for rigorous quantitative description <strong>of</strong> uncertainty inmodel parameters <strong>and</strong> predictions.(2) permits inferences that consider both prior knowledge <strong>and</strong> newdata.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 2 / 26


<strong>Bayesian</strong> modelingTwo distinguishing core notionsBasic elements <strong>of</strong> Baysian inferenceJust as with maximum likelihood methods, we begin with a modeldescribing the relationship between the data y <strong>and</strong> theunknown-valued parameters θ — a likelihood function p (y|θ).c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 3 / 26


<strong>Bayesian</strong> modelingTwo distinguishing core notionsBasic elements <strong>of</strong> Baysian inferenceJust as with maximum likelihood methods, we begin with a modeldescribing the relationship between the data y <strong>and</strong> theunknown-valued parameters θ — a likelihood function p (y|θ).Prior knowledge (or belief) about model parameters θ isquantitatively described in terms <strong>of</strong> a probability distribution — aprior distribution p (θ).c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 3 / 26


<strong>Bayesian</strong> modelingTwo distinguishing core notionsBasic elements <strong>of</strong> Baysian inferenceJust as with maximum likelihood methods, we begin with a modeldescribing the relationship between the data y <strong>and</strong> theunknown-valued parameters θ — a likelihood function p (y|θ).Prior knowledge (or belief) about model parameters θ isquantitatively described in terms <strong>of</strong> a probability distribution — aprior distribution p (θ).Bayes rule provides a rigorous basis for quantitative statisticalinference that considers both prior knowledge <strong>and</strong> new data viathe posterior distribution: p (θ|y) ∝ p (y|θ) p (θ)c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 3 / 26


<strong>Bayesian</strong> modelingTwo distinguishing core notionsBasic elements <strong>of</strong> Baysian inferenceJust as with maximum likelihood methods, we begin with a modeldescribing the relationship between the data y <strong>and</strong> theunknown-valued parameters θ — a likelihood function p (y|θ).Prior knowledge (or belief) about model parameters θ isquantitatively described in terms <strong>of</strong> a probability distribution — aprior distribution p (θ).Bayes rule provides a rigorous basis for quantitative statisticalinference that considers both prior knowledge <strong>and</strong> new data viathe posterior distribution: p (θ|y) ∝ p (y|θ) p (θ)Use the posterior distribution for inferences regarding parametervalues.Use the posterior predictive distribution for inferences regardingfuture observations:∫p (y new |y) = p (y new |θ) p (θ|y) dθc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 3 / 26


<strong>Bayesian</strong> modelingBarriers to <strong>Bayesian</strong> pharmacometric applicationsBarriers to more widespread use <strong>of</strong> <strong>Bayesian</strong>pharmacometric modelingCan be much more computationally intensiveLack <strong>of</strong> adequate support for PK <strong>and</strong> PD modelsPKBugs provides built-in models limited to linear compartmentalmodels with 1–3 compartments, but itDoes not appropriately h<strong>and</strong>le time-dependent covariatesOnly allows input into 1 compartment: central or absorptionSupport for ODEs available (WBDIFF, MCSim <strong>and</strong> Open<strong>BUGS</strong>) butsubstantial programming is needed to apply it to complicated eventhistories, e.g., typical multiple dose dataIn short, there is was no real equivalent to PREDPPc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 4 / 26


Computational tools/methods for <strong>Bayesian</strong> modelingMCMC simulationComputational methods for <strong>Bayesian</strong> modelingMarkov chain Monte Carlo (MCMC) simulationSimulation methods for performing high dimensional integrationrequired for <strong>Bayesian</strong> modeling.Simulate r<strong>and</strong>om variables from the posterior distributions <strong>of</strong>interest, e.g., means <strong>and</strong> variances <strong>of</strong> the population distributions<strong>of</strong> PK/PD parameters.Inferences follow directly from the distributions <strong>of</strong> simulatedparameter valuesPoint estimates from mean, median or mode.Posterior intervals from percentiles, e.g., 95% interval from the 2.5<strong>and</strong> 97.5 percentiles.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 5 / 26


Computational tools/methods for <strong>Bayesian</strong> modelingComputer programs implementing <strong>Bayesian</strong> MCMCComputer programs implementing <strong>Bayesian</strong> MCMCMCMC methods for <strong>Bayesian</strong> modeling have been addedrecently to some existing pharmacometric tools, e.g.,NONMEM VIIS-AdaptAdvantagesPK/PD model libraries <strong>and</strong> model-specification languagesMCMC <strong>and</strong> less computationally-dem<strong>and</strong>ing algorithms within asingle platformDisadvantagesLimited stochastic model structure2 levels <strong>of</strong> r<strong>and</strong>om variation + prior distributionsVery limited choice <strong>of</strong> distributions: normal for IIV, normal-Wishart forpriorc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 6 / 26


Computational tools/methods for <strong>Bayesian</strong> modelingComputer programs implementing <strong>Bayesian</strong> MCMCComputer programs implementing <strong>Bayesian</strong> MCMCMore general-purpose s<strong>of</strong>tware tools implementing MCMC for<strong>Bayesian</strong> modeling include:Win<strong>BUGS</strong>SAS MCMC procedureOpen<strong>BUGS</strong>Micros<strong>of</strong>t Infer.NETJAGSAdvantagesFlexible stochastic model structureNo limit on levels <strong>of</strong> variabilityChoice <strong>of</strong> many distributionsCan easily combine models with very different stochastic structuresDisadvantagesNo specialized support for pharmacometrics applicationsLess flexible specification <strong>of</strong> structural model (esp. for <strong>BUGS</strong>variants)Less computationally-dem<strong>and</strong>ing algorithms not available within thesame platformc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 7 / 26


Computational tools/methods for <strong>Bayesian</strong> modeling<strong>BUGS</strong> language MCMC programs<strong>BUGS</strong> language MCMC programsWin<strong>BUGS</strong>, Open<strong>BUGS</strong> <strong>and</strong> JAGS use the <strong>BUGS</strong> model specificationlanguage.<strong>BUGS</strong> = <strong>Bayesian</strong> analysis <strong>Using</strong> Gibbs SamplingSame basic syntaxSome differences in available functions <strong>and</strong> distributionsc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 8 / 26


Computational tools/methods for <strong>Bayesian</strong> modeling<strong>BUGS</strong> language MCMC programs<strong>BUGS</strong> language MCMC programsWin<strong>BUGS</strong> 1.4.3Windows application only available as executable codeWell-tested stable code. Probably the best version for productionuse at this time.No active development. Bug fixes only.Both graphical <strong>and</strong> text model specificationData format is R-like.May be run from R via the R2Win<strong>BUGS</strong> package (<strong>and</strong> others).Open<strong>BUGS</strong> 3.0.5JAGSc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 9 / 26


Computational tools/methods for <strong>Bayesian</strong> modeling<strong>BUGS</strong> language MCMC programs<strong>BUGS</strong> language MCMC programsWin<strong>BUGS</strong> 1.4.3Uses Gibbs sampling with sampling from the conditionaldistributions according to:Continuous distributionsConjugateDirect sampling using st<strong>and</strong>ard algorithmsLog-concave Derivative-free adaptive rejection samplingRestricted range Slice samplingUnrestricted range MetropolisDiscrete distributionsFinite upper bound InversionShifted Poisson Direct sampling using st<strong>and</strong>ard algorithmsFrom D Spiegelhalter, A Thomas, N Best, D Lunn. Win<strong>BUGS</strong> User Manual.Version 1.4 (2003).Open<strong>BUGS</strong> 3.0.5JAGSc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 9 / 26


Computational tools/methods for <strong>Bayesian</strong> modeling<strong>BUGS</strong> language MCMC programs<strong>BUGS</strong> language MCMC programsWin<strong>BUGS</strong> 1.4.3Open<strong>BUGS</strong> 3.0.5Probable successor to Win<strong>BUGS</strong> 1.4.*Source code availablePrimarily a Windows application, but a non-GUI version is availablefor Linux systems with Intel/AMD processorsActive development. Currently a beta version.Release <strong>of</strong> a stable version imminent.More functions <strong>and</strong> distributions.Improved existing samplers <strong>and</strong> added moreDifferent approach to selecting samplersJAGSc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 9 / 26


Computational tools/methods for <strong>Bayesian</strong> modeling<strong>BUGS</strong> language MCMC programs<strong>BUGS</strong> language MCMC programsWin<strong>BUGS</strong> 1.4.3Open<strong>BUGS</strong> 3.0.5JAGSJAGS = Just Another Gibbs SamplerWritten in C++, so is more platform-independentUsually run from R via the rjags packagec○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 9 / 26


Computational tools/methods for <strong>Bayesian</strong> modelingMore on Win<strong>BUGS</strong><strong>BUGS</strong> model specification languageNot a procedural languageModel specification similar to statistical literature conventionsDoes not explicitly describe a sequence <strong>of</strong> calculationsStatement order is largely unimportantStochastic nodes a.k.a. probability distributionsLogical nodes a.k.a. deterministic functionsVery flexible w.r.t. stochastic structure <strong>of</strong> a modelLack <strong>of</strong> control structures (true loops & if-then-else) <strong>and</strong> controlover calculation order can make specification <strong>of</strong> complexdeterministic functions difficult (but there is a solution)c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 10 / 26


Computational tools/methods for <strong>Bayesian</strong> modelingA simple <strong>BUGS</strong> modelMore on Win<strong>BUGS</strong>y i ∼ N `ŷ i , σ 2´ model{“loop” overŷ i = a + bx iPrior distributions:✘✾✘ ✘✘ ✘ ✘ the datafor ( i in 1:10){a ∼ N (0, 10000)# model for observed data (likelihood function)b ∼ N (0, 10000)y[ i ] ∼ dnorm(ymean[i],tau)σ ∼ Uniform (0, 10000)# simulation <strong>of</strong> new ”observations”, i.e., samples from# the posterior predictive distributionypred[i ] ∼ dnorm(ymean[i],tau)# expected value <strong>of</strong> y[i] given x[i]stochastic ✟✚ ✟✟✟✟✟✟✯✚✚✚✚✚✚✚❃ ymean[i]


Computational tools/methods for <strong>Bayesian</strong> modelingMore on Win<strong>BUGS</strong>Available distributions (Win<strong>BUGS</strong> 1.4.*)ContinuousDiscreteUnivariate Multivariate Univariate Multivariatebeta Dirichlet Bernoulli multinomialchi-squared normal binomialdouble exponential Student-t categoricalgamma Wishart negative binomialgeneralized gammapoissonlog-normallogisticnormalparetoStudent-tuniformWeibullc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 12 / 26


Computational tools/methods for <strong>Bayesian</strong> modelingMore on Win<strong>BUGS</strong>Available distributions (Win<strong>BUGS</strong> 1.4.*)ContinuousDiscreteUnivariate Multivariate Univariate Multivariatebeta Dirichlet Bernoulli multinomialchi-squared normal binomialdouble exponential Student-t categoricalgamma Wishart negative binomialgeneralized gammapoissonlog-normallogistic More flexibilitynormalWin<strong>BUGS</strong> also has a large set <strong>of</strong> built-inparet<strong>of</strong>unctions.Student-tUsers may program custom functionsuniform<strong>and</strong> distribution via the WBDevWeibullpackage.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 12 / 26


<strong>BUGS</strong>ModelLibraryDescription<strong>BUGS</strong>ModelLibraryhttp://bugsmodellibrary.googlecode.com<strong>BUGS</strong>ModelLibrary is a prototype PKPD model library for use withWin<strong>BUGS</strong> 1.4.3. The current version includes:Specific linear compartmental models:One compartment model with first order absorptionTwo compartment model with elimination from <strong>and</strong> first orderabsorption into central compartmentGeneral linear compartmental model described by a matrixexponentialGeneral compartmental model described by a system <strong>of</strong> first orderODEsOpen-source s<strong>of</strong>tware developed <strong>and</strong> distributed free <strong>of</strong> charge byMetrum Institute.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 13 / 26


<strong>BUGS</strong>ModelLibraryDescription<strong>BUGS</strong>ModelLibraryThe models <strong>and</strong> data format are based onNONMEM/NMTRAN/PREDPP conventions including:Recursive calculation <strong>of</strong> model predictionsThis permits piecewise constant covariate valuesBolus or constant rate inputs into any compartmentH<strong>and</strong>les single dose, multiple dose <strong>and</strong> steady-state dosinghistoriesImplemented NMTRAN data items include:TIME, EVID, CMT, AMT, RATE, ADDL, II, SSc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 14 / 26


<strong>BUGS</strong>ModelLibraryBuilt-in models<strong>BUGS</strong>ModelLibraryBuilt-in modelsPre-compiled models are currently limited to one <strong>and</strong> twocompartment linear PK models with or without first orderabsorption.OneCptModel(time, amt, rate, ii, evid, cmt, addl, ss, theta)TwoCptModel(time, amt, rate, ii, evid, cmt, addl, ss, theta)Win<strong>BUGS</strong>modelfunction argument parametersmodel name names in thetaone compartment OneCptModel time, amt, rate, ii, CL, V 2 , k a − CL , F V 1 , F 2 ,2model with first orderevid, cmt, addl, ss t lag1 , t lag2absorptiontwo compartmentmodel with first orderabsorptionTwoCptModel time, amt, rate, ii,evid, cmt, addl, ssCL, Q, V 2 , V 3 , k a − λ 1 ,F 1 , F 2 , F 3 , t lag1 , t lag2 ,t lag2c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 15 / 26


<strong>BUGS</strong>ModelLibraryBuilt-in models<strong>BUGS</strong> model using a built-in <strong>BUGS</strong>ModelLibrary functionmodel{for ( i in 1:nSubjects){# Inter-patient variation in PK parameters# theta[1:5] = (CL, Q, V1, V2, ka - lambda1)logtheta[ i , 1:5] ∼ dmnorm(logthetaMean[i, 1:5], omega.inv[1:5, 1:5])for ( j in 1:5){log(theta[ i , j ])


<strong>BUGS</strong>ModelLibraryBuilt-in models<strong>BUGS</strong> model using a built-in <strong>BUGS</strong>ModelLibrary functionvalue10.610.410.210.09.89.69.42.12.01.91.81.716.015.515.014.514.0373635343332110105100950.1060.1040.1020.1000.0980.0960.094200 400 600 800 1000MCMC sampleCLHatDkaHatQHatV1HatV2Hatsigmachain123density2.01.51.00.50.01.21.00.80.60.40.20.00.140.120.100.080.060.040.020.00CLHat9.4 9.6 9.8 10.010.210.410.6QHat14.0 14.5 15.0 15.5 16.0V2HatMean SD Median 2.5%ile 97.5%ile Effective NcCL 10.1 0.201 10.1 9.69 10.5 1740bQ 14.8 0.331 14.8 14.2 15.5 647cV 1 34.8 0.983 34.8 32.9 36.7 130cV 2 103 2.86 103 97.7 109 345k â− λ 1 1.91 0.0704 1.91 1.77 2.05 109σ 0.1 0.00226 0.0999 0.0957 0.104 16405432100.40.30.20.10.015010050DkaHat1.7 1.8 1.9 2.0 2.1V1Hat32 33 34 35 36 37sigma095 100 105 1100.0940.0960.0980.100.1020.1040.106valueMarginal posteriordistributions <strong>of</strong> modelparameters estimatedby MCMC simulation.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 17 / 26


<strong>BUGS</strong>ModelLibraryBuilt-in models<strong>BUGS</strong> model using a built-in <strong>BUGS</strong>ModelLibrary functionplasma concentration1201008060402005004003002001000●●●● ● ● ●●●●●●●●●●●●●●●● ● ● ●● ●●●●● ●●5 mg●●●●●●●●●●●●● ● ● ●●●●●20 mg●●●●●●●●● ●●●●●● ●●●●●●● ●●●●●●●● ●●●●● ●●●● ● ● ● ● ●●● ● ●●●0 5 10 15 200 5 10 15 20time (h)Posterior median <strong>and</strong> 95% posterior prediction25020015010050010008006004002000●●●10 mg●●●●● ● ●●● ●●●●●●●●●●●● ●●●●●●●●●●●●●● ● ● ● ● ●● ● ●●●●●●●●●●●●●● ●●●●●● ●● ● ●●●●●●●●● ●●●●●●interval overlayed on observed data40 mg●●●●●●●●●● ●● ● ● ●●●● ●●●●Simulation-baseddiagnostics, e.g.,posterior-predictivechecking, may be done aspart <strong>of</strong> the fitting.Separate simulation orboot-strapping steps arenot necessary.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 18 / 26


<strong>BUGS</strong>ModelLibraryUser-programmed models<strong>BUGS</strong>ModelLibraryUser-programmed modelsLinear compartmental modelsUser specifies the non-zero elements <strong>of</strong> the rate constant matrix.Linear ODE’s are solved using matrix exponential methods.General compartmental modelsUser specifies the ODE’s.The ODE’s are solved using either a Runge-Kutta 4th/5th ordermethod or LSODA, the Livermore Solver for Ordinary Differentialequations with Automatic method switching for stiff <strong>and</strong> nonstiffproblems.Both cases require user specification <strong>of</strong> a rate constant matrix orODE’s in a template Component Pascal procedure that must becompiled using the BlackBox Component Builder 1.5.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 19 / 26


<strong>BUGS</strong>ModelLibraryUser-programmed modelsComponent Pascal code for matrix exponential modelPROCEDURE UserKMatrix(IN theta: ARRAY OF REAL; nCmt: INTEGER):POINTER TO ARRAY OF ARRAY OF REAL;VARkMatrix: POINTER TO ARRAY OF ARRAY OF REAL;i , j : INTEGER;CL, Q, V2, V3, ka, ke0, k10, k12, k21: REAL;BEGINNEW(kMatrix,nCmt,nCmt);FOR i := 0 TO nCmt−1 DO;FOR j := 0 TO nCmt−1 DO;kMatrix[ i , j ] := 0;END; END;CL := theta[0]; Q := theta[1]; V2 := theta[2];V3 := theta[3]; ka := theta[4]; ke0 := theta[5];k10 := CL/V2; k12 := Q/V2; k21 := Q/V3;(∗ Assign nonzero rate constants ∗)kMatrix[0,0] := -ka;kMatrix[1,0] := ka;kMatrix[1,1] := -(k10+k12);kMatrix[1,2] := k21;kMatrix[2,1] := k12;kMatrix[2,2] := -k21;kMatrix[3,1] := ke0;kMatrix[3,3] := -ke0;RETURN kMatrix;END UserKMatrix;x ′ =⎡⎢⎣⎤−k a 0 0 0k a − (k 10 + k 12 ) k 21 0⎥0 k 12 −k 21 0 ⎦ x0 k e0 0 −k e0c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 20 / 26


<strong>BUGS</strong>ModelLibraryUser-programmed modelsComponent Pascal code for general ODE modelPROCEDURE UserDerivatives(IN theta, x: ARRAY OF REAL;numEq: INTEGER; t: REAL; OUT dxdt: ARRAY OF REAL) ;VARCL, Q, V2, V3, ka, kout, yeff0, EC50, k10, k12, k21, conc: REAL;BEGINCL := theta[0]; Q := theta[1]; V2 := theta[2];V3 := theta[3]; ka := theta[4];kout := theta[5]; yeff0 := theta[6]; EC50 := theta[7];k10 := CL/V2; k12 := Q/V2; k21 := Q/V3;(∗ ODE’s excluding piecewise constant ∗)(∗ input rates in the data set ∗)dxdt[0] := -ka * x[0];dxdt[1] := ka * x[0] - (k10 + k12) * x[1] + k21 * x[2];dxdt[2] := k12 * x[1] - k21 * x[2];conc := x[1]/V2;dxdt[3] := kout * (yeff0 - (1 - conc/(EC50+conc))*(x[3]+yeff0))END UserDerivatives;c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 21 / 26


<strong>BUGS</strong>ModelLibraryDevelopment plans<strong>BUGS</strong>ModelLibrary development plansMore built-in modelsPort to Open<strong>BUGS</strong>Tool to simplify <strong>and</strong> automate specification <strong>and</strong> compiling <strong>of</strong>user-programmed modelsRefining program architecture <strong>and</strong> efficiencyMore extensive testingc○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 22 / 26


<strong>Pros</strong> <strong>and</strong> consWhy <strong>Bayesian</strong> modeling?<strong>of</strong> <strong>Bayesian</strong> modelingAbility to combine prior knowledge with new datain a manner that appropriately accounts foruncertainty in the prior informationFully <strong>Bayesian</strong> treatment <strong>of</strong> uncertainty in parameters <strong>and</strong>predictionsInferences about parameters <strong>and</strong> predictions easily expressed interms <strong>of</strong> the posterior distributionsNo series or linear approximations <strong>of</strong> the likelihood functionImproved estimation performanceParticularly for generalized hierarchical models, e.g, models forcategorical datac○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 23 / 26


<strong>Pros</strong> <strong>and</strong> cons<strong>of</strong> <strong>Bayesian</strong> modelingWhy not <strong>Bayesian</strong> modeling?Computation timeAdditional work required to specify <strong>and</strong> assess sensitivity to priordistributions.Learning time.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 24 / 26


<strong>Pros</strong> <strong>and</strong> cons<strong>Pros</strong> <strong>and</strong> cons <strong>of</strong> <strong>BUGS</strong><strong>of</strong> <strong>BUGS</strong><strong>Pros</strong>Much more flexible stochastic structureNo restriction on number <strong>of</strong> levels <strong>of</strong> r<strong>and</strong>om effectsMany built-in distribution functions plus ability to add moreEasier to combine models for multiple types <strong>of</strong> data, e.g.:Individual patient data + summary dataPreclinical + clinical dataAvailability <strong>of</strong> pharmacometrics modeling tools, e.g.,<strong>BUGS</strong>ModelLibrary.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 25 / 26


<strong>Pros</strong> <strong>and</strong> cons<strong>of</strong> <strong>BUGS</strong><strong>Pros</strong> <strong>and</strong> cons <strong>of</strong> <strong>BUGS</strong><strong>Pros</strong>Much more flexible stochastic structureNo restriction on number <strong>of</strong> levels <strong>of</strong> r<strong>and</strong>om effectsMany built-in distribution functions plus ability to add moreEasier to combine models for multiple types <strong>of</strong> data, e.g.:Individual patient data + summary dataPreclinical + clinical data<strong>Cons</strong>Availability <strong>of</strong> pharmacometrics modeling tools, e.g.,<strong>BUGS</strong>ModelLibrary.Lack <strong>of</strong> less computationally-dem<strong>and</strong>ing methods within the sameplatform to support exploratory modeling, e.g., estimation <strong>of</strong>posterior modes.Component Pascal programming required for development <strong>of</strong>more complex structural models.c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 25 / 26


And now for a bit <strong>of</strong> self-deprecating humorFan mail from some frequentists<strong>Bayesian</strong> (bey’ -zhuhn) n. 1. Result <strong>of</strong>breeding a statistician with a clergyman toproduce the much sought after “honeststatistician” a . 2. One who asks you whatyou think before a clinical trial in order to tellyou what you think afterwards b . 3. Onewho, vaguely expecting a horse, <strong>and</strong>catching a glimpse <strong>of</strong> a donkey, stronglybelieves he has seen a mule c .a anonymousb Stephen Senn. Statistical Issues in Drugdevelopment, 2nd Edition. Wiley, 2008. p. 51.c ibid. p. 46c○2009 Metrum Institute <strong>Bayesian</strong> <strong>Modeling</strong> <strong>Using</strong> <strong>BUGS</strong> AAPS 2009 26 / 26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!