NONMEM VI Bug Alert #4
NONMEM Code
Please note that items 4 and 5 both affect the EVAL routine.
4. Under some circumstances there may be an extra, unnecessary pass
through the data set.
Background: The changes made to the EVAL routine to permit output of the
individual contributions to the objective function result in an extra
pass through the data with ICALL=2 when the $ESTIM record is omitted or
MAXEVAL=0 is used. This may result in unexpected behavior when the user
anticipates only a single pass through the data with ICALL=2. For
example, there could be code accumulating some variable throughout the
pass, assuming there would be only one pass. The following changes will
permit output of the individual contributions to the objective function
without the extra pass through the data.
Fix: In EVAL
1) Locate
DOUBLE PRECISION OX
and change to
C DELETED 2/2007
C DOUBLE PRECISION OX
2) Locate the first occurance of
IOBJX=0
and change to
C CHANGED 2/2007
IOBJX=1
3) Locate the code
IF(OPEVL.EQ.0)THEN
IOBJX=1
CALL OBJ (OX)
IOBJX=0
ENDIF
and change to
C CHANGED 2/2007
C IF(OPEVL.EQ.0)THEN
C IOBJX=1
C CALL OBJ (OX)
IOBJX=0
C ENDIF
Please note that IOBJX=0 should NOT be commented out.
5. In some cases when the ETABARCHECK option is used the standard errors
(SE:) for the conditional eta estimates may be incorrect. The associated
p-values are unaffected.
In EVAL
1) locate
A=(SUME2(I)-SUME(I)**2)/NINDR(I)
SE(I)=A
and change
SE(I)=A
to
C CHANGED 2/2007
SE(I)=SQRT(A)
2) locate
A=(SUME2(M+I)-SUME(M+I)**2)/NINDR(M+I)
SE(I)=A
and change
SE(I)=A
to
C CHANGED 2/2007
SE(I)=SQRT(A)
Be careful to change only these specific statement. There are somewhat
similar sections of code that should not be changed.
After making these code changes, recompile the NONMEM routines.
_______________________________________________________________________________________________________________________________________