Fortran errors

2 messages 2 people Latest: Jun 02, 1999

Fortran errors

From: Sam Wai Johnn Date: June 02, 1999 technical
From: Sam Wai Johnn <scip8115@nus.edu.sg> Subject: Fortran errors Date: Wed, 2 Jun 1999 18:42:39 +0800 Dear NONMEM Users, While assessing a structural model, I encountered this execution time error: run-time error M6201 : MATH *** : DOMAIN error It appears as soon as FSUBS is started. The control stream is as follows: $PROBLEM INDEX SET DATA $INPUT ID DATE TIME AMT RATE PREP ADDL II DV SS CMT AGE WT HT=DROP AST AL TOTB $DATA DATA10.1 $SUBROUTINES ADVAN2 TRANS2 $PK TVCL=THETA(1)+THETA(6)*(AGE-2.2)**THETA(7) CL=TVCL*(1+ETA(1)) TVVD=THETA(2) V=TVVD*(1+ETA(2)) IF (PREP.EQ.0) THEN TVF1=THETA(3) ELSE TVF1=1 ENDIF F1=TVF1*(1+ETA(3)) KA=THETA(4) TVF2=THETA(5) F2=THETA(5) K=CL/V S2=V $ERROR Y=F+ERR(1) $THETA 2 (0,30) (0,.2) (1.77 FIXED) (1 FIXED) 1.5 .2 $OMEGA .25 .25 .25 $SIGMA .000016 I am using NONMEM IV level 2.1 on Windows NT with MS Powerstation FORTRAN V4.0. I have 14 subjects and their age range between 1.1 to 14 years old (median=2.2 years old). The INTEL constants in BLKDAT was used which are the correct ones for IBM PC. It was thought that the run-time error may be caused by negative or zero operand being raised to a negative or zero power. Thus, EXIT statements were added to the control stream : IF (THETA(6).LE.0) EXIT 1 100 IF (THETA(7).LE.0) EXIT 1 200 IF (WT.LE.0) EXIT 1 300 When this new control stream was run with the data of the first 3 subjects using NONMEM V, it ended with this message: MONITORING OF SEARCH: 0PRED EXIT CODE = 1 0INDIVIDUAL NO. 3 ID=0.30000000E+01 (WITHIN-INDIVIDUAL) DATA REC NO.1 THETA= 2.00E+00 3.00E+01 2.00E-01 1.77E+00 1.00E+00 1.50E+00 2.00E-01 PK SUBROUTINE: ERROR IN COMPUTATION ATTEMPT TO COMPUTE BASE**POWER WITH BASE<0 AND POWER>0 A symbolic debugger was used and these values were obtained at the point in PK routine where the error is detected: age = 1.659999966621399 (dbx) p age-2.2 age-2.2 = -0.5400000333786013 (dbx) p theta(7) theta(7) = 0.2000000029802322 This shows that this computation, (AGE-2.2)**THETA(7) is mathematically undefined when age < 2.2. I was wondering if anyone has encountered a similar problem before when "centering the covariates at their median"? Can anyone suggest a better way of using age and theta(7) in the model to circumvent this run-time error? Any suggestions would be much appreciated. Thanks. WJ Sam (e-mail: scip8115@nus.edu.sg)

Re: Fortran errors

From: Lewis B. Sheiner Date: June 02, 1999 technical
Date: Wed, 02 Jun 1999 14:04:54 -0700 From: Lewis Sheiner <lewis@c255.ucsf.edu> X-Accept-Language: en MIME-Version: 1.0 To: nmusers <nmusers@c255.ucsf.edu> Subject: Re: Fortran errors Content-Transfer-Encoding: 7bit "Centering" refers to the scale on which avariables is considered. If you are going to raise a variable to a power, then it is more natural to consider it on the log scale; hence centering should be AGE/2.2, rather than age-2.2 LBS.