Dear all,

I wonder if anyone has experience with the error of illegal division by 0 when 
running PsN SCM with continuous time-varying covariates (error message in 
below).   The same scm command and configuration file works perfectly fine for 
categorical covariates.
F:1 .. Illegal division by zero at 
C:/GBW_MyPrograms/PsN-5.3.0/strawberry/perl/bin/..\site\lib\PsN_5_3_0/tool/scm.pm
 line 6246.

Upon inspection, it appears that the error stems from the variable $CIWRESI 
becoming zero (line 6246 in below).
my $W = ($DV - $CIPREDI) / $CIWRESI;

My NONMEM code is in below. Any thoughts on how to solve this?
$ERROR
IPRED = F
IRES  = DV - IPRED
W     = SQRT((THETA(5)*IPRED)**2 + THETA(6)**2)
IF (W.EQ.0) W = 1
IWRES = IRES/W

LLOQ=0.1
IF (DV.GE.LLOQ) THEN
   F_FLAG = 0
   Y      = IPRED + EPS(1)*W
ELSE
   F_FLAG = 1
   Y      = PHI((LLOQ-IPRED)/W)
ENDIF

IF (ICALL.EQ.4) THEN
Y = IPRED +  EPS(1)*W
END IF

Thank you!
Zhigang
------------------------------------------------------------
Zhigang Wang, MSc, PhD candidate
Leuven Pharmacometrics Research Group
Dept. of Pharmaceutical and Pharmacological Sciences
KU Leuven, Belgium



Reply via email to