___________________________________________________________________
 |                                                                 |
 |                                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  L
 to  obtain  more  information  by studying the appropriate sections of  L
 NONMEM code and previous examples that may be available from  advanced  L
 users.                                                                  L

 USAGE:                                                                  L
 SUBROUTINE CONTR (ICALL,CNT,IER1,IER2)                                  L
 INTEGER ICALL,IER1,IER2                                                 L
 (If double precision is to be used):                                    L
 DOUBLE PRECISION CNT                                                    L
 (If single precision is to be used):                                    L
 REAL CNT                                                                L

 DISCUSSION:                                                             L
 CONTR is a user-supplied routine for computing the  contribution  made  L
 to  the  objective function from an L1 record.  It is used to override  L
 the NONMEM default objective function.                                  L

 When NM-TRAN is used, the $CONTR record may be used  to  request  that  L
 information from the data records be made available to CONTR.           L

 A user-supplied CONTR routine is required when the dimension of  OMEGA  L
 is  zero,  i.e.,  when  there are no etas in the problem, and in other  L
 situations, e.g., with categorical data.                                L

 Input argument:                                                         L

  ICALL                                                                  L
      Similar to ICALL for PRED subroutine.                              L
      Possible values: 0, 1, 2                                           L

 Output argument:                                                        L

  CNT                                                                    L
      Contribution to -2log likelihood for  data  from  the  individual  L
      record.                                                            L

  IER1                                                                   L
      0 - Normal return.                                                 L
      non-zero - error return.                                           L

  IER2                                                                   L
      0 - error-recovery is to be implemented when IER1 is nonzero.      L
      1 - NONMEM is to stop when IER1 is nonzero.                        L

 Other Inputs:                                                           L

 Other inputs are available to CONTR in NONMEM read-only commons.        L
 In particular:                                                          L
   ROCM0 (current theta)                                                 L
   ROCM1  and  ROCM4  (DV  and  data  values  for   this   L1   record.  L
   (See $CONTR)                                                          L
   ROCM3 (predictions and derivatives)                                   L

 NONMEM Utility Routines:                                                L

 Other NONMEM subroutines may be called by CONTR, depending on the type  L
 of data, as follows.                                                    L

                 POPULATION            SINGLE-SUBJECT                    L
   CONTINUOUS    ELS, NCONTR           ELS                               L
                 (note: same result)                                     L
   CATEGORICAL   NCONTR                none                              L

 Scatterplots                                                            L
      If the scatterplot  step  is  implemented,  and  zero  lines  are  L
      appropriate  for  values of RES and/or WRES, CONTR should request  L
      that NONMEM generate such lines.  (NONMEM does  this  by  default  L
      when  a  user  supplied  CONTR is not supplied.)  To request zero  L
      lines for RES and WRES, CONTR should set OPSCRS(2) and  OPSCRS(3)  L
      (respectively) to 1 in CM38.                                       L
      e.g.,                                                              L
      COMMON /CM38/ OPSCRS(3)                                            L
      INTEGER OPSCRS                                                     L
       ...                                                               L
      IF (ICALL.LE.1) THEN                                               L
      OPSCRS(2)=1                                                        L
      OPSCRS(3)=1                                                        L
      ENDIF                                                              L

REFERENCES: Guide I Section G.3
REFERENCES: Guide III Section III.3.5, VII.5.4
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)