Back to the Top
The following message was posted to: PharmPK
Dear PharmPK members, I know I'm bringing up old stuff here and not of
very high scientific interest but if someone could give me a hand or at
least give me some hints, it would be greatly appreciated.
Here's the question: How in Winnonlin can you specify multiple dosing
in a user model based on a system of differential equations (NOT the
analytical solution).
I know I could do this quickly using the integrated algebraic functions
but the model I'm working on right now is reasonably complex. I did
symbolic integration in a math software and the resulting expressions
take several pages. The expressions were slimer using numerical
integration of course but then I figured I'd lose some control over
parameter modification for simulation purposes (right ?).
So in the end, I thought that getting the trick for performing
multiple-dosing in WNL using differentials would be simpler than to
integrate every time I change the value of a micro-constant.
Many thanks in advance.
Pierre-Olivier :o)
P.S. I did browse through the PharmPK archive and got a few hits but I
had trouble interpreting the the answers.
Back to the Top
The following message was posted to: PharmPK
Dear Pierre-Oliver,
You might want to consider using GastroPlus for your simulations.
The type of analysis you describe is quite straightforward with it. You
can even easily simulate, and fit models to, mixed multiple doses if you
wish (e.g., mixtures of iv bolus, iv infusion, immediate release, and
controlled release doses given at various times). Any combination of
pharmacokinetic and pharmacodynamic model parameters can be fitted
across single or multiple observation sets. Saturable metabolism and
transport can also be include if needed. Simple 1-, 2-, or 3-compartment
PK can be used, or complete PBPK models if you prefer.
An interactive web demonstration and a short trial period can be
arranged if you are interested.
Best regards,
Walt Woltosz
Chairman & CEO
Simulations Plus, Inc. (AMEX: SLP)
1220 W. Avenue J
Lancaster, CA 93534-2902
U.S.A.
http://www.simulations-plus.com
Phone: (661) 723-7723
FAX: (661) 723-5524
E-mail: walt.at.simulations-plus.com
Back to the Top
Dear Pierre,
Code for implementing multiple dosing for a differential equation model
in WinNonlin will vary depending upon the type of input (ie 1st-order
absorption, IV infusion etc.) Also, even for a particular model, there
are a variety of ways to implement the dosing code. For example,
perhaps, the most conceptually straightforward approach for a 1st-order
oral absorption model is to write code that simply 'dumps' drug into
the gut compartment at each dosing time. However, this approach does
have the limitation that the exact times for each dose must be embedded
in your data file. An alternative approach for the same model would be
to model the amount of drug in the gut (Ag) as a superposition of
exponential terms, then incorporate the term for Ag into the
differential equation for the central compartment. For your reference,
please find below annotated code for implementing each approach for a
1-compartment model.
EXAMPLE I: CODE FOR A FULL DIFFERENTIAL EQUATION MODEL
Model 1
remark ******************************************************
remark Developer:
remark Model Date: 29-Mar-2005
remark Model Version: 1.0
remark ******************************************************
remark
remark - define model-specific commands
remark 1-Compartment Model with 1st-order extravascular absorption
remark no. parameter constant
remark --- --------- ------------
remark 1 Ka # of Doses
remark 2 CL Dose #1
remark 3 V1 Time of Dose #1, etc.
remark **Warning!**Warning!**Warning!**Warning!**Warning!**Warning!
remark ** In order for this model to work, you must have time **
remark ** points in your data set that correspond to each dose **
remark ** administration time and each dump time from the bile. **
remark **Warning!**Warning!**Warning!**Warning!**Warning!**Warning!
remark - define differential equations starting values
COMMANDS
NFUNCTIONS 1
NDERIVATIVES 2
NPARAMETERS 3
PNAMES 'Ka', 'CL', 'V1'
END
remark - define temporary variables
TEMPORARY
T=X
NDOSE = CON(1)
DOSE1 = CON(2)
END
START
Z(1) = DOSE1
Z(2) = 0
END
remark - define differential equations
DIFFERENTIAL
remark The next block of code handles the multiple dosing.
J=3
remark Count up the number of doses administered by time = T.
remark NDOSE is the total number of Doses given to each subject.
DO I = 1 to NDOSE-1
remark The next conditional compares the current value of the
remark integration time index with the administration time
remark of the ith dose.
remark Note: The 3rd cell in the dosing grid contains the admin
remark time for the 1st dose. After that, dose times will be
remark in every second cell. Thus, CON(J) will
remark contain the dose time for the Jth dose.
remark If the administration time for the Jth dose is < the
remark current value of the integration time index then
remark J (# administered doses) is incremented and
remark the DO Loop is iterated another time.
remark Otherwise control "skips" to the block of
remark code labelled "RED:"
IF T > CON(J) THEN
J = J+2
ELSE
GOTO RED
ENDIF
NEXT
remark The next block of code checks to see if the (very)last dose has
remark already been administered. If so, then the time and amount of
remark the last dose are saved into the variables LASTDOSE and
remark TLSTDOSE.
IF INT(((J-1)/2)+.001) = NDOSE AND T > CON(J) THEN
LASTDOSE = CON(J-1)
TLSTDOSE = CON(J)
GOTO GREEN
ENDIF
RED:
remark The following conditional ensures that the dose at Time
remark zero is not counted twice.
IF J > 3 THEN
remark The next conditional checks to see if the integration
remark time index is exactly equal to the Jth dosing time. If
remark so, then the dose is "dumped" into the absorption
remark compartment. LASTDOSE is the amount of the last administered
remark dose, TLSTDOSE is the administration time of the last dose.
IF T = CON(J) THEN
LASTDOSE = CON(J-1)
TLSTDOSE = CON(J)
Z(1) = Z(1)+LASTDOSE
ELSE
LASTDOSE = CON(J-3)
TLSTDOSE = CON(J-2)
ENDIF
ELSE
LASTDOSE = DOSE1
TLSTDOSE = 0
ENDIF
GREEN:
DZ(1) = -Z(1)*Ka
DZ(2) = (Z(1)*Ka - Z(2)*CL)/V1
END
remark - define algebraic functions
FUNCTION 1
F= Z(2)
END
remark - define any secondary parameters
remark - end of model
EOM
EXAMPLE 2: CODE FOR A MIXED-SPECIFICATION MODEL
Model 1
remark one compartment model - first order input and output
rema
rema no. parameter constant secondary parm.
rema --- --------- -------- ---------------
rema 1 v_f # doses k10
rema 2 ka dose 1 auc
rema 3 k10 time, etc ka half life
rema 4 k10 half life
rema 5 tmax
rema 6 cmax
rema*************************************************************
rema i--------------------i
rema i i
rema ka --> i compartment 1 i ---> k10
rema i i
rema i--------------------i
rema*************************************************************
comm
nder 1
nparm 3
nsec 6
pnames 'v_f', 'ka', 'CL_f'
snames 'k10','auc', 'ka_hl', 'k10_hl', 'tmax', 'cmax'
end
START
Z(1) = 0
END
DIFF
j=1
ndose=con(1)
rema Count up the number of doses administered up to time x
do i = 1 to ndose
j=j+2
if x <= con(j) then goto red
endif
next
red:
ndose = i-1
rema Perform superposition
remark Agut is the total amount of drug in the gut
Agut=0
j=1
do i = 1 to ndose
j=j+2
t=x - con(j)
d=con(j-1)
remark A_ds_i is the amount of drug in the gut associated
remark with the ith dose
A_ds_i=d*dexp(-ka*t)
Agut=Agut+ A_ds_i
next
DZ(1) = (ka*Agut-CL_F*Z(1))/V_F
END
func1
f=Z(1)
end
seco
k10=CL_F/V_F
d=con(2)
auc=d/v_F/k10
ka_hl=-dlog(.5)/ka
k10_hl=-dlog(.5)/k10
tmax=(dlog(ka/k10)/(ka-k10))
cmax=(d/v_f)*exp(-k10*tmax)
end
EOM
Of course, code for implementing infusion dosing or zero-order
absorption processes will differ slightly from the attached examples.
So, if you are faced with either of these cases, and are having trouble
please let me know.
I hope this information proves helpful. If there is any way that I may
be of further assistance, please let me know.
With Best Regards,
Mark
Mark R. Lovern, Ph. D.
Director, Marketing Services
Pharsight Corporation
Phone: (919) 852-4607
Mobile (919) 622-2296
FAX: (919) 859-6871
5520 Dillard Drive, Suite 210
Cary, NC 27511
Back to the Top
The following message was posted to: PharmPK
[David - welcome back. Up for a little humor today?]
By comparison, you could use GastroPlus and do the following:
Enter the properties of your compound:
MWt
Solubility at a reference pH
pKa(s)
logP or logD at a reference pH
effective permeability (usually estimated from in vitro, or can
be fitted)
Enter the PK parameters (CL, Vd, multi-compartment distribution rate
constants if you have them)
Create a simple text file for multiple dosing that gives the time,
amount, and dosage form (tablet, iv bolus, iv infusion, tablet, capsule,
suspension, etc.) for each dose. If you like, you can also change
physiological models at any time by putting the name of the ACAT model
at the end of each line (e.g., fasted, fed) if you want to simulate such
changes. A sample file might look like this:
'Dosage Form Amount Start Time
End Time Physiology
IV: Bolus 10 0
Human Fasted
IV: Infusion 20 2
8 Human Fasted
IR: Tablet 20 12
Human Fed
IR: Tablet 0 14
Human Fasted
And so on. The last line has no dose, but is used to switch back to
fasted state.
**Warning!**Warning!**Warning!**Warning!**Warning!**Warning!
The next step is essential.
**Warning!**Warning!**Warning!**Warning!**Warning!**Warning!
Click Start to run the simulation.
: )
Walt Woltosz
Chairman & CEO
Simulations Plus, Inc. (AMEX: SLP)
1220 W. Avenue J
Lancaster, CA 93534-2902
U.S.A.
http://www.simulations-plus.com
Phone: (661) 723-7723
FAX: (661) 723-5524
E-mail: walt.-at-.simulations-plus.com
Back to the Top
The following message was posted to: PharmPK
Hi,
I think that Boomer (http://www.boomer.org/) is a very good choice
to pick up, espcially if you like to use differential eqs. to
define your models with multiple dosing. It's not very difficult
to learn how to use Boomer. And it is free.
Best regards,
Yung-jin Lee, Ph.D.
Associate Professor & Deputy Head of
Graduate Institute of Clinical Pharmacy,
College of Pharmacy,
Kaohsiung Medical University,
Kaohsiung, TAIWAN 807
Phone: (07)312-1101 ext. 2262
Fax: (07)313-6316
http://clinpharm.kmu.edu.tw/
PharmPK Discussion List Archive Index page
Copyright 1995-2010 David W. A. Bourne (david@boomer.org)