# PharmPK Discussion - WinNonlin Model for Data in Peripheral and Central Compartment

PharmPK Discussion List Archive Index page
• On 1 Oct 2009 at 23:27:08, "Patrick Noonan" (pat.-a-.pknoonan.com) sent the message
`I have an interesting problem and hope that there may be a relativelysimple solution.  I'm attempting to model drug input (zero order for 6-12 hr) into a peripheral compartment and have concentration data forthat compartment as well as for plasma.Assuming linear PK, I tried the following model in WinNonlin.Unfortunately, it doesn't converge. I was able to model the peripheralcompartment data alone, but have problems after adding the secondcompartment.  Any thoughts or help would be greatly appreciated.Best regards,PatMODELremark   ******************************************************remark   Developer:remark   Model Date: 10-01-2009remark   Model Version:    1.0remark   ******************************************************remarkremark - define model-specific commandsCOMMANDSNCON 1NFUNCTIONS 2NDERIVATIVES 2NPARAMETERS 6PNAMES  'VT', 'V1', 'Tabs', 'KO1', 'K12', 'K20'ENDremark - define temporary variablesTEMPORARY   T = X   DOSE = CON(1)   K0 = DOSE/TabsENDremark - define differential equations starting valuesSTARTZ(1) = 0Z(2) = 0ENDremark - define differential equationsDIFFERENTIAL   IF T <= Tabs THEN     K01 = K0   ENDIF   IF T > Tabs THEN     K01 = 0   ENDIFDZ(1)=K01-VT*K12*Z(1)DZ(2)=K12*Z(1)*VT-K20*Z(2)*V1ENDremark - define algebraic functionsFUNCTION 1F= Z(1)ENDFUNCTION 2F= Z(2)ENDremark - define any secondary parametersremark - end of modelEOM`
Back to the Top

• On 2 Oct 2009 at 09:22:09, Sri Duvvuri (pkscientist.aaa.live.com) sent the message
`PatrickLooking at the code, i see that K21 is missing. Also, K01 and Tabs areentered as a parameters. For controlling the rate of input, Tabs maycoded as constant and K01 is calculated by the program.  Also, can youshare the error message that you are get when you try to fit bothcentral and peripheral compartment data simultaneously.ThanksSridhar`
Back to the Top

• On 2 Oct 2009 at 09:29:16, Leonid Gibiansky (LGibiansky.-a-.quantpharm.com) sent the message
`The following message was posted to: PharmPKPat,There are a lot of small errors in the code. Try this code, it shouldwork: > NCON 1 > NFUNCTIONS 2 > NDERIVATIVES 2 > NPARAMETERS 5 > PNAMES  'VT', 'V1', 'Tabs', 'K12', 'K20' > END > remark - define temporary variables > TEMPORARY >   T = X >   DOSE = CON(1) >   K0 = DOSE/Tabs > END > remark - define differential equations starting values > START > Z(1) = 0 > Z(2) = 0 > END > remark - define differential equations > DIFFERENTIAL >   IF T <= Tabs THEN >     K01 = K0 >   ENDIF >   IF T > Tabs THEN >     K01 = 0 >   ENDIF > DZ(1)=K01-K12*Z(1) > DZ(2)=K12*Z(1)-K20*Z(2) > END > remark - define algebraic functions > FUNCTION 1 > F= Z(1)/VT > END > FUNCTION 2 > F= Z(2)/V1 > END--Leonid Gibiansky, Ph.D.President, QuantPharm LLCweb:    www.quantpharm.come-mail: LGibiansky at quantpharm.com`
Back to the Top

• On 2 Oct 2009 at 10:49:09, Jason Chittenden (Jason.Chittenden.-at-.certara.com) sent the message
`The following message was posted to: PharmPKDear Pat,It looks like your derive equations are inconsistent.  Are the unitson Z supposed to be mass or concentration.  Since you state that youhave concentration data, the units on your functions (F1, F2) need tobe concentrations.  So your model implies that Z is concentration aswell.  But the derive equations:DZ(1)=K01-VT*K12*Z(1)DZ(2)=K12*Z(1)*VT-K20*Z(2)*V1....take Z and multiply Volume, giving a mass.  K01 is Dose/Tabs, so itis a mass as well.  So, Z is treated as a mass in your derivs and as aconcentration elsewhere.May I suggest changing your equations slightly:DZ(1)=K01-VK12*Z(1)DZ(2)=K12*Z(1)-K20*Z(2)AndF1 = Z(1)/VTF2 = Z(2)/V1Let me know how that works for you, or if I've misunderstood yourproblem.Jason Chittenden, MSDirector, Product QualityPharsight - A Certara(tm) Company`
Back to the Top

• On 2 Oct 2009 at 11:20:03, "Shawn Spencer" (shawn.spencer.at.famu.edu) sent the message
`The following message was posted to: PharmPKPat,First, you want to make sure you have tried different minimizationalgorithms, e.g., Nelder-Mead vs. Marquardt-Levenberg, while payingattention to the time required for the failure in convergence.  If ittakeswhile, you may have the appropriate structural model, however yourinitialestimates may be causing the program to get lost, and you should tryexpanding or narrowing your limits with "deliberately off" initialestimates. If the run terminates quickly, the model may be tooconstrainedfor the simultaneous fit, and after testing for various weightingschemes,there may be a mass balance problem.  You can try adding a parallelfirstorder loss (K10) of drug from your peripheral compartment which willallowthe central compartment data some room to be fit with the peripheralcompartment, and/or alternatively, the dose may be taken for granted,andyou should be adding a bioavailability parameter.  In the end, itsrelatively difficult to diagnose over the boards due to the assortmentoffactors involved, for example, whether you are using pooled data fromseveral subjects or not, can also contribute to difficulties ingetting thefitting parameters.Good luck,-ShawnShawn D. Spencer, Ph.D., R.Ph.Assistant Professor of BiopharmaceuticsFlorida A&M College of PharmacyTallahassee, FL 32307shawn.spencer.-a-.famu.edu`
Back to the Top

 Want to post a follow-up message on this topic? If this link does not work with your browser send a follow-up message to PharmPK@boomer.org with "WinNonlin Model for Data in Peripheral and Central Compartment" as the subject Support PharmPK by using thelink to buy books etc.from Amazon.com

Copyright 1995-2011 David W. A. Bourne (david@boomer.org)