+--------------------------------------------------------------------+
| |
| CCONTR |
| |
+--------------------------------------------------------------------+
MEANING: CCONTR 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 CCONTR (I,CNT,P1,P2,IER1,IER2)
USE SIZES, ONLY: ISIZE,DPSIZE
INTEGER(KIND=ISIZE), INTENT(IN OUT) :: I,IER1,IER2
REAL(KIND=DPSIZE), INTENT(IN OUT) :: CNT,P1(:),P2(:,:)
DISCUSSION:
CCONTR is a user-supplied routine for computing the contribution made
to the objective function from an L2 record. It is used to override
the NONMEM default objective function.
CCONTR may be used when there are no epsilons or etas and in other
situations, e.g., with categorical population data.
NONMEM sometimes produces this error message:
USER CCONTR ROUTINE NOT USED, BUT THERE ARE NO EPSILONS,
AND ETAS ARE TO BE ESTIMATED
This can happen when POSTHOC etas are requested, but the data are sin-
gle-subject data. The user may have included the POSTHOC option in
error.
The CCONTR routine may contain the following code:
CALL CELS (CNT,P1,P2,IER1,IER2)
If the data is correlated across L2 records (e.g., auto-regressive
data), CCONTR computes the contribution to the objective function for
data from an entire individual record.
Input argument:
I Similar to Ifor PRED subroutine
Possible values: 0, 1, 2
Output argument:
CNT The conditional contribution to the objective function for this
L2 record.
P1 P1(i) is the partial derivative of CNT with respect to eta(i).
P2 P2(i,j) is the second partial derivative of CNT with respect to
eta(i) and eta(j) (for i <= j).
At ICALL=1, CCONTR sets P2(1,1)=-1 if second derivative values
are to be used. Otherwise, if cross-gradient values are to be
used.
IER1
0 - Normal return.
non-zero - error return.
IER2
0 if error-recovery is to be implemented when IER1 is nonzero.
1 if NONMEM is to stop when IER1 is nonzero.
Other inputs
Other inputs are available to CCONTR in NONMEM read-only global
variables.
(See MIX_CONTR:_THETA)
E.g., USE ROCM_REAL, ONLY: THETA=>THETAC
(See CCONTR:_Y,DATA,N1,N2,DIM)
(See CCONTR:_F,G,H)
CCONTR is called by NONMEM's NCONTR routine with one level 2 ("L2")
record after another. If no CCONTR routine is supplied by the user,
NCONTR calls NONMEM utility CELS ("Conditional ELS"; ELS contribution
conditional on knowing eta). If no L2 data item is present, each
level 2 record is a single observation event record. Otherwise, it is
a group of observation records grouped together by a common value of
L2.
REFERENCES: Guide IV Section III.B.4
Go to main index.
Created by nmhelp2html v. 1.0 written by Niclas Jonsson (Modified by AJB 5/2006,11/2007,10/2012)