Simulation returns negative CP values
Dear all,
I just finished building my model and I am going onto the simulation.
However I constantly generated some negative CP values without being able to
identify the underlying problem.
Here is my control stream:
$SUBROUTINE ADVAN2 TRANS1
$PK
;ETA SIMULATION - LIMIT TO 3*SD
IF (ICALL.EQ.4.AND.NEWIND.NE.2) THEN
DO WHILE (ABS(ETA(1)).GT.0.594) ; 0.594 = SQRT(0.0392)*3
CALL SIMETA(ETA)
ENDDO
ENDIF
;CLEARANCE
TVCL=THETA(1)
CL=TVCL*(1+(THETA(5)*LOG(CYP2B6+1)))*(1+(THETA(4)*((WT/63.5)-1)))*(1+ETA(1))
;VOLUME OF DISTRIBUTION
TVVD=THETA(2)
V=TVVD
S2=V
;REQUIRED CONSTANT
K=CL/V
KA=THETA(3)
REPI=IREP
$THETA
2.51 ; THETA(1)
200 ; THETA(2)
0.445 ; THETA(3) FIXED
0.368 ; THETA(4)
2.88 ; THETA(5)
$ERROR
IF (ICALL.EQ.4.AND.NEWIND.NE.2) THEN
DO WHILE (ABS(EPS(1)).GT.0.863) ; 0.863 = SQRT(0.0827)*3
CALL SIMEPS(EPS)
ENDDO
ENDIF
Y=F*(1+EPS(1))
$OMEGA
0.0392
$SIGMA
0.0827
$SIMULATION (2315625 NORMAL NEW) SUBPROBLEMS=10
I wonder if that was due to some ETA(1) or EPS(1) less than -1 being
generated. But I thought I had already used the whileloop to avoid this from
happening.
Thanks in advance,
matthew