From LIAO@cosmos.prius.jnj.com Tue Feb 13 08:51:00 1996
Subject: FORTRAN error Hi, I am working on an PK/PD analysis using an indirect inhibition model. When I fixed the gamma to 1 in the Hill function, I was able to get somewhat reasonable fit. However, when I tried to estimate gamma (greater than 1) in order to fit the steeper recovery of the PD data, I got an error msg at the begining of the iteration-
run-time error M6202: MATH - log: SING error
I am running the DOUBLE PRECISION NONMEM VERSION IV LEVEL 2.1 on a PC. The control stream file is shown below. Any suggestion will be greatly appreciated.
$PROB A INDIRECT INHIBITION PK/PD MODEL
$INPUT ID AMT TIME DOSE PD=DV CL V KA K12 K21
$SUBROUTINES ADVAN8 TOL=5
F1=100 ;BOUNDARY CONDITION FOR EQUATION 1
CP=M1*DEXP(-ALPH*T) + M2*DEXP(-BETA*T) + M3*DEXP(-P(1)*T)
IC=EMAX*CPG/(IC50**GAMMA + CPG)
DADT(1)= -K10*A(1) + R01*(1 - IC)
$THETA (5, 30, 100) (50, 800, 3000) 1.0 FIXED (1.1, 3, 10)
$EST POSTHOC MAXEVAL=9999 PRINT=10 MSFO=MSF2
$TABLE ID TIME CP YCAL K10 IC50 R01 EMAX FILE=XXX1.OUT
From alison Tue Feb 13 09:28:38 1996
Subject: FORTRAN error I'd guess that this may be the source of the problem:
Most likely CP is 0 at the start of each individual's data.
When GAMMA=1, it could be that the math routine is willing to compute 0**1 and make the result 0.
But when GAMMA is something other than 1, it must compute, in effect,
But LOG(0) is a "singularity" of the log function,hence the message. Code like this should work.
IF (CP.EQ.0) DEL=1
Here, CP +DEL is always > 0 and can be computed. But (1-DEL) is 0 when DP is 0, so CPG is 0 when CP is 0.
There may be other problems; derivatives of powers ** are also somewhat difficult, numerically. Give this a try, and if you still have trouble, let me know. Please sent the data next time.