Dear Luann,
 
Thank you for your valuable suggestion. (1-DRUG) is actually causing a problem. 
I did put lower bound for it to be zero and it worked. I am going to use Emax 
model in my next phase for this work. 
This point i would like to thank you, Jane, Peter Bonate and all other nmuser 
for valuable guidance.
Thanks

Mayank Patel
B.S, M.S (Industrial Pharmacy)
Ph.D in Pharmaceutics (cont'd.)
Long Island University, NY, USA


________________________________
From: Luann Phillips <luann.phill...@cognigencorp.com>
To: mayank patel <mayankpate...@yahoo.co.in> 
Sent: Tuesday, 5 June 2012 10:06 AM
Subject: Re: [NMusers] Problem in Simulation

Maynek,

After a closer look, I noticed that the functional form for the drug effect, 
(1-DRUG) where DRUG=slope*Cp for 2 of the treatments, allows drug effect to not 
only shut off the the input of A(1) but actually cause a higher rate of exit 
for A(1).

This may be the root of the problems that you are having because as Cp becomes 
high there is only exit from compartment 1 which could potentially drive it 
below zero (if cp is high for long enough). This in turn would make dadt(2), 
dadt(3), ... dadt(5) have exit only rates and drive them below zero. Using your 
fixed typical value of slope this problem begins to occur when 1-DRUG < 0 or 
cp> 4.67.

Normally drug effects are parameterized using Emax equations to prevent this 
problem.
DRUGE= 1 - Max*cp/(cp50+cp)
where Max has an upper bound of 1
and Cp50 has a lower bound of 0
DRUGE has upper bound of 1 and lower bound of 0

You could also try an exponential drug effect: DRUGE=EXP(theta(n)*cp) where 
theta(n)<0.
DRUGE has an upper bound of 1 when cp=0 and a lower bound of 0.

If you need to remain with linear, then use an if statement to enforce that the 
drug effect can not do more than shut off the production of A(1)

IF(1-DRUG) < 0 then (1-DRUG)=0.  However, this introduces a cusp at the point 
where DRUG=1 which can make your model unstable.

Hope this is helpful to resolving your problem with negative A(5) values,

Luann Phillips
Director PK/PD
Cognigen Corporation


mayank patel wrote:
> I tried to commenting out that perticular observation point as Dr. Bonate 
> suggested and it gave me same error for next observation point. Even after 
> removing that perticular ID, i got the same error for ID 77. I tried as Jean 
> mentioned to put some IF statement for DADT(1), as below
> Before: DADT(1) = -KTR*A(1)  + KTR*A(1)*(1-DRUG)*((CIRC0/A(5))**GAM)
> New Statement:
> FAB= CIRC0/A(5)
> IF(A(5).LE.0) FAB=CIRC0/0.0001
> DADT(1) = -KTR*A(1)  + KTR*A(1)*(1-DRUG)*((FAB)**GAM)
>  and this worked. Now i have a concern that, does this IF statement affects 
>physiological relevance of this process. As Neutrophil counts never goes to 
>zero, and in this model it does. So is it appropriate to use this statement or 
>I need to try some other options? (???)
>  Mayank Patel
> B.S, M.S (Industrial Pharmacy)
> Ph.D in Pharmaceutics (cont'd.)
> Long Island University, NY, USA
> *From:* Luann Phillips <luann.phill...@cognigencorp.com>
> *To:* "Bonate, Peter" <peter.bon...@us.astellas.com>
> *Cc:* mayank patel <mayankpate...@yahoo.co.in>; "nmusers@globomaxnm.com" 
> <nmusers@globomaxnm.com>
> *Sent:* Monday, 4 June 2012 1:12 PM
> *Subject:* Re: [NMusers] Problem in Simulation
> 
> Mayank,
> 
> ((CIRC0/A(5))**GAM should be the problem.
> 
> CIRC0 approaching zero
> or
> A(5) becoming extremely large relative to current value of CIRC0 so that 
> (CIRC0/A(5)) is equivalent to a machine zero.
> 
> You may want to put in code to resample eta when you get an unusually small 
> or large eta value for CIRC0.
> 
> ---
> 
> With respect to transit compartments, it is my understanding that
> 
> KTR= N/MTT where N=number of compartments
> 
> or
> 
> KTR = (N+1)/MTT when you start numbering transit compartments with n=0 so N 
> is 1 less than the number of transit compartments
> 
> 
> Luann Phillips
> Director PK/PD
> Cognigen Corporation
> 
> Bonate, Peter wrote:
>  > The problem looks like this part of the code:
>  >
>  > ((CIRC0/A(5))**GAM
>  >
>  > Either CIRCO0 or A(5) is equal to zero.
>  >
>  > Try this
>  >
>  > ((CIRC0/A(5) + .000001)**GAM
>  >
>  >
>  > pete
>  >
>  > Peter L. Bonate, PhD
>  > Senior Director
>  > Global Head - Pharmacokinetics, Modeling, and Simulation
>  > Global Clinical Pharmacology & Exploratory Development
>  >
>  > NOTICE OF NEW ADDRESS  EFFECTIVE 29 MAY 2012:
>  > 1 Astellas Way, 2N.292
>  > Northbrook, Il 60062
>  > phone: 224-205-5855
>  > fax: 224-205-5914
>  > email: peter.bon...@astellas.com <mailto:peter.bon...@astellas.com>
>  >
>  >
>  > A bumper sticker I recently saw - "Calculus - The Agony and dx/dt"
>  >
>  > -----Original Message-----
>  > From: owner-nmus...@globomaxnm.com <mailto:owner-nmus...@globomaxnm.com> 
>[mailto:owner-nmus...@globomaxnm.com <mailto:owner-nmus...@globomaxnm.com>] On 
>Behalf Of mayank patel
>  > Sent: Monday, June 04, 2012 10:13 AM
>  > To: nmusers@globomaxnm.com <mailto:nmusers@globomaxnm.com>
>  > Subject: [NMusers] Problem in Simulation
>  >
>  > Dear NMUSERS,
>  > I am trying to simulate ANC using Transit compartment Neutrapenia model. I 
>am simulating for different schedule. I have used this for another drug and it 
>worked fine. But rightnow it gives me error as below. If someone can guide me 
>regarding this problem, it would be helpful.
>  > PROBLEM NO.:        1    SUBPROBLEM NO.:      1 0PRED EXIT CODE = 10 
>INDIVIDUAL NO.      61  ID= 6.10000000000000E+01  (WITHIN-INDIVIDUAL) DATA REC 
>NO. 207 THETA=  5.45E+00  1.35E+02  1.74E-01  2.14E-01  0.00E+00 DES 
>SUBROUTINE: ERROR IN COMPUTATION
>  >  ATTEMPT TO COMPUTE BASE**POWER WITH BASE<0. MESSAGE ISSUED FROM 
>SIMULATION STEP==== END TIME ====  Fri 06/01/2012 02:09 PM
>  >
>  > Please find below control stream. If anyone can take a look and advice on 
>that it would be helpful.
>  >
>  > $PROB  ANC Predictions
>  > $INPUT  C=DROP ID EVID CMT AMT RATE DV TRET TIME DAYS $DATA  
>all_schedules_grid.csv  IGN=C $SUBS  ADVAN8 TOL=5 $MODEL
>  > COMP=(STEM)          ;1
>  > COMP=(TRANSIT1)      ;2
>  > COMP=(TRANSIT2)      ;3
>  > COMP=(TRANSIT3)      ;4
>  > COMP=(TRANSIT4)      ;5
>  > COMP=(Central)        ;6
>  > COMP=(Peri)      ;7
>  > $PK
>  > "FIRST" USE PRCOM_INT,ONLY:IMAX
>  > " MAIN
>  > " IMAX=9900000000
>  > CL =  1.14
>  > V1 = 6
>  > K12 = 0.14
>  > K21 = 0.06
>  > K10 = CL/V1
>  > CIRC0 = THETA(1)*EXP(ETA(1))
>  > MTT  = THETA(2)*EXP(ETA(2))
>  > KTR  = 4/MTT
>  > GAM  = THETA(3)
>  > SLOPE = THETA(4)*EXP(ETA(3))
>  > A_0(1)    =  CIRC0
>  > A_0(2)    =  CIRC0
>  > A_0(3)    =  CIRC0
>  > A_0(4)    =  CIRC0
>  > A_0(5)    =  CIRC0
>  >
>  > $DES
>  >  EDRUG = 0
>  >  CP=A(6)/V1
>  >  IF(TRET.EQ.1.OR.TRET.EQ.3) EDRUG = SLOPE*CP
>  >  DRUG  =  EDRUG
>  > DADT(1) = -KTR*A(1)  + KTR*A(1)*(1-DRUG)*((CIRC0/A(5))**GAM)
>  > DADT(2) = -KTR*A(2)  + KTR*A(1)
>  > DADT(3) = -KTR*A(3)  + KTR*A(2)
>  > DADT(4) = -KTR*A(4)  + KTR*A(3)
>  > DADT(5) = -KTR*A(5)  + KTR*A(4)  ; CIRCULATING CELLS
>  > DADT(6)  =  -K10*A(6) -K12*A(6) +K21*A(7)
>  > DADT(7)  =  -K21*A(7) +K12*A(6)
>  > $ERROR
>  > IPRED  =  0.0001
>  > IF(A(5).GT.0) IPRED = A(5)
>  >  W      =  THETA(5)*IPRED
>  > IRES  =  DV -  IPRED
>  > IWRES  =  IRES/W
>  > Y      =  IPRED+W*EPS(1) REP=IREP
>  > AA9 = A(6)/V1
>  > $THETA 5.45 FIX        ;1 BASE
>  > $THETA 135 FIX        ;2 MTT (h)
>  > $THETA 0.174 FIX        ;3 POWER
>  > $THETA 0.2141 FIX        ;4 SLOPE
>  > $THETA 0 FIX; (.554 ) ;7 Res err
>  > $OMEGA 0.168  FIX  ;1 IIV CIRC0
>  > $OMEGA 0.0256 FIX  ;2 IIV MTT
>  > $OMEGA 0.36  FIX  ;3 IIV SLOPE
>  > $SIGMA 0 FIX ;1 FIX
>  > $SIM (889215690) ONLYSIM SUBPROBLEM = 5
>  > $TABLE REP ID TIME TRET DAYS CP EVID IPRED CIRC0 MTT GAM SLOPE NOPRINT 
>NOHEADER FILE=ResultANC.tab
>  >
>  > Schedule file:
>  > C  24.7143mg_1on-0off
>  > C  ID  Evid  CMT  AMT  RATE  DV  TRET  TIME  DAYS
>  > 1 0 5 0 0  . 3 0 0
>  > 1 1 6 24.71 24.71  . 3 0 0
>  > 1 0 5 0 0  . 3 12 0.5
>  > 1 0 5 0 0  . 3 24 1
>  > 1 1 6 24.71 24.71  . 3 24 1
>  > 1 0 5 0 0  . 3 36 1.5
>  >
>  > Mayank PatelPh.D Student,
>  > Long Island University, NY
>  >
>  >
>  >
> 
> 

Reply via email to