NONMEM Users Network Archive

Hosted by Cognigen

Re: Weibull Absorption Simulation - Multiple Doses

From: Leonid Gibiansky <LGibiansky>
Date: Sat, 24 Apr 2010 23:44:23 -0400

Dear Burgess,
Several points:
1. I am not sure whether your Weibull function is correctly implemented
(I think, the original post that you used contained an error), see
discussion in http://www.boomer.org/pkin/PK09/PK2009395.html and
references cited there.

I would rather call this form "Weibull":

DADT(1)=-BIO*DOSE*(BETA/ALPHA)*((T/ALPHA)**(BETA-1))*EXP(-(T/ALPHA)**BETA)

(assuming bioavailability BIO and dose DOSE). In this case, cumulative
amount of the drug absorbed by time T is equal to
                 CumAMT(T) = BIO*DOSE*(1-exp(-(t/alpha)^beta))
which is a Weibull function.
For single (but not repeated!) doses, you can use
dA1/dt = -A(1)*(beta/alpha)*(t/alpha)^(beta-1)
(as explained by Jee Eun in http://www.boomer.org/pkin/PK09/PK2009395.html )

However, the depot compartment is actually not needed, you can use
$DES
WRATE=BIO*DOSE*(BETA/ALPHA)*((T/ALPHA)**(BETA-1))*EXP(-(T/ALPHA)**BETA)
DADT(1)=WRATE-K10*A(1)-K12*A(1)+K21*A(2)
DADT(2)=K12*A(1)-K21*A(2)

====================
2. Multiple doses is more tricky to implement. You need to trace each
dose separately. Below is an example (for Weibull function as in (1))
for three doses D1 D2 D3 at times 0 TIME2 TIME3

$DES
TM1=T
WR1=BIO*D1*(BETA/ALPHA)*((TM1/ALPHA)**(BETA-1))*EXP(-(TM1/ALPHA)**BETA)

WR2=0
IF(T.GT.TIME2) THEN
TM2=T-TIME2
WR2=BIO*D2*(BETA/ALPHA)*((TM2/ALPHA)**(BETA-1))*EXP(-(TM2/ALPHA)**BETA)
ENDIF

WR3=0
IF(T.GT.TIME2) THEN
TM3=T-TIME3
WR3=BIO*D3*(BETA/ALPHA)*((TM3/ALPHA)**(BETA-1))*EXP(-(TM3/ALPHA)**BETA)
ENDIF

WRATE = WR1+WR2+WR3

DADT(1)=WRATE-K10*A(1)-K12*A(1)+K21*A(2)
DADT(2)=K12*A(1)-K21*A(2)

====================
3. If you are happy with your current model (even if this is not exactly
Weibull), you can implement multiple-dose case using multiple
compartments. Below is the same example as in (2) implemented for your
(not-exactly-Weibull) model

$DES
TM1=T
WR1=A(1)*(BETA/ALPHA)*((TM1/ALPHA)**(BETA-1))*EXP(-(TM1/ALPHA)**BETA)

WR4 = 0
IF(T.GT.TIME2) THEN
TM2=T-TIME2
WR4=A(4)*(BETA/ALPHA)*((TM2/ALPHA)**(BETA-1))*EXP(-(TM2/ALPHA)**BETA)
ENDIF

WR5 = 0
IF(T.GT.TIME3) THEN
TM3=T-TIME3
WR5=A(5)*(BETA/ALPHA)*((TM3/ALPHA)**(BETA-1))*EXP(-(TM3/ALPHA)**BETA)
ENDIF

WRATE=WR1+WR2+WR3
DADT(1)=-WR1

DADT(2)=WRATE-K20*A(2)-K23*A(2)+K32*A(3)
DADT(3)=K23*A(2)-K32*A(3)

DADT(4)=-WR4
DADT(5)=-WR5

Doses D1, D2, D3 should be send (via data file) to compartments 1, 4,
and 5 respectively (at times 0 TIME2 and TIME3)

====================
4. If you have more doses, you need to add more compartments. At some
point, you may start "recycling" depot compartments, assuming that by
the time of the next dose, amount in the depot compartment is
negligible. If you can assume that by the time of the next dose all
previous-dose amount is absorbed, you can implement model in (2) as

$DES
TM1=T
IF(T.GT.TIME2) TM1=T-TIME2
IF(T.GT.TIME3) TM1=T-TIME3

WRATE=BIO*DOSE*(BETA/ALPHA)*((TM1/ALPHA)**(BETA-1))*EXP(-(TM1/ALPHA)**BETA)

DADT(1)=WRATE-K10*A(1)-K12*A(1)+K21*A(2)
DADT(2)=K12*A(1)-K21*A(2)

where I assumed DOSE=D1=D2=D3

====================
5. Similarly, if you assume rapid (before the next dose) absorption,
code in (3) can be modified as

$DES
TM1=T
IF(T.GT.TIME2) TM1=T-TIME2
IF(T.GT.TIME3) TM1=T-TIME3
WR1=A(1)*(BETA/ALPHA)*((TM1/ALPHA)**(BETA-1))*EXP(-(TM1/ALPHA)**BETA)

DADT(1)=-WR1
DADT(2)=WR1-K20*A(2)-K23*A(2)+K32*A(3)
DADT(3)=K23*A(2)-K32*A(3)
with doses D1 D2 D3 placed into compartment 1 at times 0, TIME2 and TIME3.
====================

This message contains a lot of code, and it was NOT tested. There could
be typos, so please, before you use it, check everything to follow what
is going on.

Thanks
Leonid

--------------------------------------
Leonid Gibiansky, Ph.D.
President, QuantPharm LLC
web: www.quantpharm.com
e-mail: LGibiansky at quantpharm.com
tel: (301) 767 5566




Freeman, Burgess wrote:
> Dear NMUsers,
>
> I recently modeled some single dose oral data in NONMEM, in which a 2 compartment Weibull absorption model described the data best. Now I'm trying to simulate either QD or BID dosing to obtain predicted Ct profiles on Day 8. For some reason the simulation doesn't acknowledge any dosing past the first dose at time 0, despite doses being present in the data file. I think it has something to do with $DES, and not specifying doses and dose times in the control stream. See below for my control stream. I found a message thread in the archive with some advice on this from Nick Holford (http://www.cognigencorp.com/nonmem/current/2007-April/0094.html) but even after implementing his suggestion, I still cannot successfully simulate multiple dosing. Any help or insight would be appreciated. Thanks.
>
> Burgess Freeman, Pharm.D.
> Sr. Research Scientist
> Drug Metabolism, Pharmacokinetics & Clinical Pharmacology (DMPKCP)
> Array BioPharma, Inc.
> Boulder, CO 80301
>
> $PROBLEM run4.mod - SIMULATION 2COMPWB T, IIV+PROP, FOCE-I w g95
> ;http://www.cognigencorp.com/nonmem/current/2007-April/0094.html
> $INPUT ID TIME DV AMT CMT EVID MDV GRP
> $DATA sim.csv IGNORE #
> $SUBROUTINES ADVAN6 TOL=4
>
> $MODEL NCOMP=3
> COMP=(DEPOT,DEFDOSE) COMP=(CENTRAL,DEFOBS) COMP=(PERHIPH)
>
> $PK
> TCL=THETA(1)
> TV2=THETA(2)
> TQ=THETA(3)
> TV3=THETA(4)
>
> ;Weibull parameters
> TBETA=THETA(5)
> TALPHA=THETA(6)
>
> CL=TCL*EXP(ETA(1))
> IF (ABS(ETA(1)).GT.100.) EXIT 1 100
> V2=TV2*EXP(ETA(2))
> IF (ABS(ETA(2)).GT.100.) EXIT 1 200
> Q=TQ*EXP(ETA(3))
> IF (ABS(ETA(3)).GT.100.) EXIT 1 300
> V3=TV3*EXP(ETA(4))
> IF (ABS(ETA(4)).GT.100.) EXIT 1 400
> BETA=TBETA*EXP(ETA(5))
> IF (ABS(ETA(5)).GT.100.) EXIT 1 500
> ALPHA=TALPHA*EXP(ETA(6))
> IF (ABS(ETA(6)).GT.100.) EXIT 1 600
>
> S2=V2
> S3=V3
> K20=CL/V2
> K23=Q/V2
> K32=Q/V3
>
> $DES
> DADT(1)=-A(1)*(BETA/ALPHA)*((T/ALPHA)**(BETA-1))*EXP(-(T/ALPHA)**BETA)
> DADT(2)=-DADT(1)-K20*A(2)-K23*A(2)+K32*A(3)
> DADT(3)=K23*A(2)-K32*A(3)
>
> $THETA
> 6.6
> 25.3
> 0.266
> 6.38
> 4.1
> 3.09
>
> $ERROR
> ;Proportional Error
> Y=F*(1.0+ERR(1))
> IPRED=F
> IRES=DV-IPRED
> IWRES=IRES/IPRED
>
> $SIGMA 0.207
>
> $OMEGA 0.068 0.00409 0.00002 0.0701 0.00936 0.181
>
> $SIMULATION (123456789) ONLYSIM
> $TABLE ID CL V2 Q V3 ALPHA BETA K20 K23 K32 ETA1 ETA2 ETA3 ETA4 ETA5 ETA6
> NOPRINT ONEHEADER FILE=patab4
> $TABLE ID TIME DV MDV PRED IPRED IWRES RES WRES IRES GRP
> NOPRINT ONEHEADER FILE=sdtab4
> $TABLE ID GRP
> NOPRINT ONEHEADER FILE=cotab4
> $TABLE ID GRP
> NOPRINT ONEHEADER FILE=catab4
>
>
>
>
Received on Sat Apr 24 2010 - 23:44:23 EDT

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: nmusers-request@iconplc.com.

Once subscribed, you may contribute to the discussion by emailing: nmusers@globomaxnm.com.