Re: 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: [email protected]
>
> A bumper sticker I recently saw - "Calculus - The Agony and dx/dt"
>
Quoted reply history
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On
> Behalf Of mayank patel
> Sent: Monday, June 04, 2012 10:13 AM
> To: [email protected]
> 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