+--------------------------------------------------------------------+
| |
| CONTR |
| |
+--------------------------------------------------------------------+
MEANING: CONTR subroutine
CONTEXT: User-supplied subroutine; replaces a NONMEM dummy routine
This feature is not fully documented. The interested user may be able
to obtain more information by studying the appropriate sections of
NONMEM code and previous examples that may be available from advanced
users.
USAGE:
SUBROUTINE CONTR (I,CNT,IER1,IER2)
USE SIZES, ONLY: ISIZE,DPSIZE
INTEGER(KIND=ISIZE), INTENT(IN OUT) :: I,IER1,IER2
REAL(KIND=DPSIZE), INTENT(IN OUT) :: CNT
DISCUSSION:
CONTR is a user-supplied routine for computing the contribution made
to the objective function from an L1 record. It is used to override
the NONMEM default objective function.
A user-supplied CONTR routine may be used when the dimension of OMEGA
is zero, i.e., when there are no etas in the problem, and in other
situations, e.g., with categorical data.
When NM-TRAN is used, the $CONTR record may be used to request that
information from the data records be made available to CONTR.
Input argument:
I Similar to ICALL for PRED subroutine.
Possible values: 0, 1, 2
Output argument:
CNT Contribution to -2log likelihood for data from the individual
record.
IER1
0 - Normal return.
non-zero - error return.
IER2
0 - error-recovery is to be implemented when IER1 is nonzero.
1 - NONMEM is to stop when IER1 is nonzero.
Other Inputs:
Other inputs are available to CONTR in NONMEM read-only global vari-
ables.
In particular:
THETA (current theta) (See CONTR_MIX:_THETA)
DV and data values for this L1 record.
(See CONTR:_Y_DATA_NOBS, CONTR:_III_DIM)
(See $CONTR)
Predictions and derivatives. (See CONTR:_F_G_H)
NONMEM Utility Routines:
Other NONMEM subroutines may be called by CONTR, depending on the type
of data, as follows.
POPULATION SINGLE-SUBJECT
CONTINUOUS ELS, NCONTR ELS
(note: same result)
CATEGORICAL NCONTR none
Scatterplots
If the scatterplot step is implemented, and zero lines are appro-
priate for values of RES and/or WRES, CONTR should request that
NONMEM generate such lines. (NONMEM does this by default when a
user supplied CONTR is not supplied.) To request zero lines for
RES and WRES, CONTR should set OPSCRS(2) and OPSCRS(3) (respec-
tively) to 1.
e.g.,
USE CMNM6_INT, ONLY: OPSCRS=>ICONTRSC
...
IF (ICALL.LE.1) THEN
OPSCRS(2)=1
OPSCRS(3)=1
ENDIF
REFERENCES: Guide I Section G.3
REFERENCES: Guide IV Section III.B.4
REFERENCES: Guide V Section 12.4.16
Go to main index.
Created by nmhelp2html v. 1.0 written by Niclas Jonsson (Modified by AJB 5/2006,11/2007,10/2012)