RE: Problem in Simulation
Dear Mayank,
I do not know if it will solve your problem, but I have noticed that the only
place where you have '**' in your code is:
DADT(1) = -KTR*A(1) + KTR*A(1)*(1-DRUG)*((CIRC0/A(5))**GAM)
Since CIRC0 seems fixed to 5.45, it must be A(5) that may get smaller than zero
(some time numerical approximation may end up with a very small negative value
when the compartment #5 gets empty). In your code you did put some protection
when A(5) is less or equal to zero (see the copied code below), so you may want
to do the same with DADT(1).
IPRED = 0.0001
IF(A(5).GT.0) IPRED = A(5)
I hope this will help!
Jean
Quoted reply history
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of mayank patel
Sent: Monday, June 04, 2012 11: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
This electronic transmission may contain confidential and/or proprietary
information and is intended to be for the use of the individual or entity named
above. If you are not the intended recipient, be aware that any disclosure,
copying, distribution or use of the contents of this electronic transmission is
prohibited. If you have received this electronic transmission in error, please
destroy it and immediately notify us of the error. Thank you.