consistent error in control stream

From: R Matthew Strother Date: January 11, 2012 technical Source: mail-archive.com
Dear Nonmem users and experts - I am attempting to model a data set using the M3 method, with interoccassion variability. I've attempted to code this in multiple ways, but seem unable to include the ETAs for the various occassions, without getting a control stream error that the characters ETA are in error - this error seems to be an issue in the coding of the control stream, but I cannot find it. The error is consistently worded: AN ERROR WAS FOUND IN THE CONTROL STATEMENTS AN ERROR WAS FOUND ON LINE _(insert line here)_ AT THE APPROXIMATE POSITION NOTED: $PK ETA(X) ETA(X) ETA(X) ETA(X) ; where X is the eta in question THE CHARACTERS IN ERROR ARE: ETA 207 THIS VARIABLE MAY NOT BE GIVEN A VALUE BY THIS STATEMENT or 202 FORTRAN SYNTAX IS INCORRECT OR INAPPROPRIATE IN THIS CONTEXT I've attached the data file, as well as the two approaches to the control stream I've tried. Control stream #1 - this will minimize if I comment out the final OCC3*ETA(6) ;2-Compartment Model with Oral Administration $PROBLEM $INPUT ID TIME DV AMT EVID MDV CMT TYPE OCC2 OCC3 $DATA ..\Data.csv IGNORE=# $SUBROUTINES ADVAN4 TRANS4 $PK CL=THETA(1)*EXP(ETA(1)+OCC2*ETA(5)+OCC3*ETA(6)) Q=THETA(2)*EXP(ETA(3)) V2=THETA(3)*EXP(ETA(2)) V3=THETA(4)*EXP(ETA(4)) KA=THETA(5) S2=V2 E1=ETA(1) E2=ETA(2) E3=ETA(3) E4=ETA(4) E5=ETA(5) E6=ETA(6) $ERROR SIG=THETA(6) LOQ=10 IPRED=F IF (TYPE.EQ.1)THEN F_FLAG=0 Y =F+SIG*ERR(1) ENDIF IF (TYPE.EQ.2)THEN F_FLAG=1 DUM=(LOQ-IPRED)/SIG CUMD=PHI(DUM) Y=CUMD ENDIF W=IPRED+0.000001 IRES=DV-IPRED IWRES=IRES/W $THETA (0.0001, 10 ) ; THETA1 is CL (0.0001, 100 ) ; THETA2 is Q (0.0001, 100 ) ; THETA3 is V2 (0.0001, 4000 ) ; THETA4 is V3 (0.0001, 1, 2 ) ; THETA5 is KA (6) ; THETA6 is SIG $OMEGA (0.3 ) ; CL (0.3 ) ; V2 (0.3 ) ; Q (0.3 ) ; V3 (0.1 ) ; OCC1 (0.1 ) ; OCC2 $SIGMA (1 FIX ) ; SIGMA1 $ESTIMATION METHOD= COND LAP INTERACTION SLOW MAX=9999 NOABORT POSTHOC $TABLE ID EVID AMT TIME IPRED CWRES NOPRINT FILE=AllRecords $TABLE ID CL Q V2 V3 KA E1 E2 E3 E4 E5 E6 FIRSTONLY NOPRINT NOAPPEND FILE=FirstRecords Control Stream #2 - this will also not run and gives an error that the ETA(5) is incorrect $PROBLEM $INPUT ID TIME DV AMT EVID MDV CMT TYPE OCC2 OCC3 $DATA ..\Data.csv IGNORE=# $SUBROUTINES ADVAN4 TRANS4 $PK IOCL=(ETA(5)*OCC2+ETA(6)*OCC3) TVCL=THETA(1) CL=TVCL*EXP(ETA(1)+IOCL) TVQ=THETA(2) Q=TVQ*EXP(ETA(3)) TVV2=THETA(3) V2=TVV2*EXP(ETA(2)) TVV3=THETA(4) V3=TVV3*EXP(ETA(4)) TVKA=THETA(5) KA=TVKA S2=V2 $ERROR SIG=THETA(6) LOQ=10 IPRED=F IF (TYPE.EQ.1)THEN F_FLAG=0 Y =F+SIG*ERR(1) ENDIF IF (TYPE.EQ.2)THEN F_FLAG=1 DUM=(LOQ-IPRED)/SIG CUMD=PHI(DUM) Y=CUMD ENDIF W=IPRED+0.000001 IRES=DV-IPRED IWRES=IRES/W $THETA (0.0001, 10 ) ; THETA1 is CL (0.0001, 100 ) ; THETA2 is Q (0.0001, 100 ) ; THETA3 is V2 (0.0001, 4000 ) ; THETA4 is V3 (0.0001, 1, 2 ) ; THETA5 is KA (6 ) ; THETA6 is SIG $OMEGA (0.3) ; CL (0.3) ; V2 (0.3) ; Q (0.3) ; V3 (0.1) ; OCC2 (0.1) ; OCC3 $SIGMA (1 FIX) ; SIGMA1 $ESTIMATION METHOD=1 LAP INTERACTION SLOW MAX=9999 NOABORT $COV $TABLE ID EVID AMT TIME IPRED CWRES NOPRINT FILE=AllRecords $TABLE ID CL Q V2 V3 KA FIRSTONLY NOPRINT NOAPPEND FILE=FirstRecords I've tried in NONMEM 6, 7, and 7.2 with the same errors. Any help on strategies to get this to run at all would be greatly appreciated! Thanks, Matthew Data.csv Description: Data.csv
Jan 11, 2012 R Matthew Strother consistent error in control stream
Jan 11, 2012 Sebastien Bihorel Re: consistent error in control stream
Jan 11, 2012 William Bachman RE: consistent error in control stream
Jan 12, 2012 Nick Holford Re: consistent error in control stream