<<<<<<< HEAD ======= >>>>>>> develop

$ERROR

Denotes the ERROR abbreviated code block.

1
2
 $ERROR
 abbreviated code

Discussion

The $ERROR record is used to model intra-individual error in observed values. It is used with PREDPP. It can also be used to to convert predictions from PREDPP, i.e., scaled drug amounts, to other types of predictions (for example, to obtain the prediction of a drug effect as a function of concentration, in a pharmacodynamic study). See abbreviated code for general rules.

Assignment

Left-hand quantities

  • Y . The dependent variable under the statistical model. Requred.
  • ERROR-defined (i.e., PRED-defined) variables.
  • Quantities defined in the $PK block, assume variable scope are across $PK blocks, i.e. the COMRES=-1 option is not used in $PK or $ERROR.

Right-hand quantities

  • F. The value of the scaled drug amount in the observation compartment, computed by the structural model specified in $SUBROUTINE. Required.
  • Data items from the $INPUT statement.
  • THETA(n)
  • ETA(n) . Required for single-subject data (can also be coded ERR(n)). Optional for population data.
  • EPS(n). Required for population data (can also be coded ERR(n)).
  • Previously defined quantities, including Y.
  • Quantities defined in the $PK block, assume variable scope are across $PK blocks, i.e. the COMRES=-1 option is not used in $PK or $ERROR.
  • NEWIND: Same as the NEWIND argument passed by NONMEM to PREDPP.

    • NEWIND=0: First record of the data set. THETA value may differ from value at last call with this record.
    • NEWIND=1: First record of the data set, THETA value does not differ from value at last call with this record, and PRED is nonrecursive (see I_REC), or, First record of a subsequent individual record.
    • NEWIND=2: Subsequent data record of an individual record.
  • NEWL2

    • NEWL2=1: First record of an L2 record.
    • NEWL2=2: Otherwise.
  • ICALL: see ICALL,and Initialization-Finalization block, Simulation block, Expectation block, Data average block.

Global Variables in Modules

See Variables in modules for module variables that can be used. In particular

  • A(n): amount in compartment n, see State Vector A.
  • Reserved variable names: IDEF IREV EVTREC NVNT INDXS G HH DADT(n) E(n) P(n).

Storage and calling options

We recommend enclose the options in parentheses. Use semicolon to separate multiple options.

1
2
3
4
  $ERROR (COMRES=-1 ; CALLFL=1)
  $ERROR (ONCE PER IR)       ; same as CALLFL=1
  $ERROR (ONLY OBSERVATIONS) ; same as CALLFL=0
  $ERROR (EVERY EVENT)       ; same as CALLFL=-1 (default)

Record order

Should be after $SUBROUTINES and $INPUT, and $MODEL (if a general model such as ADVAN6 is used), and $PK (if present).

Observations of Two Different Types

Here we use an example to illustrate how concentration and effect data can be fit simultaneously (see also L2, SIGMA). Suppose that the data set for the phenobarbital example of Chapter 2 is modified to include both concentration and effect observations, and that a data item called TYPE is used to distinguish between them. When TYPE is 1, DV contains an effect measurement. When TYPE is 2, DV contains a concentration. A fragment of the data set for one individual is shown below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  ID   TIME    AMT   APGR     WT     DV TYPE L2
   1    0.    25.0    1.4      7      .   .   1
   1    2.0      .    1.4      7    6.0   1   1
   1    2.0      .    1.4      7   17.3   2   1
   1   12.5    3.5    1.4      7      .   2   2
   1   24.5    3.5    1.4      7      .   2   2
   1   37.0    3.5    1.4      7      .   2   2
   1   48.0    3.5    1.4      7      .   2   2
   1   60.5    3.5    1.4      7      .   2   2
   1   72.5    3.5    1.4      7      .   2   2
   1   85.3    3.5    1.4      7      .   2   2
   1   96.5    3.5    1.4      7      .   2   2
   1  108.5    3.5    1.4      7      .   2   2
   1  112.5      .    1.4      7    8.0   1   2
   1  112.5      .    1.4      7   31.0   2   2

Note that the L2 data items have different values for each multivariate observation within the individual record. The values 1 and 2 are chosen arbitrarily and may be re-used for the L2 data items in the next individual’s data.

We use the following control stream for analysis.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  $PROBLEM COMBINED PK/PD MODEL
  $INPUT ID TIME AMT WT APGR DV TYPE L2
  $DATA COMBDATA
  $SUBROUTINE ADVAN1
  $PK
  TVCL=THETA(1)+THETA(3)*WT
  CL=TVCL+ETA(1)
  TVVD=THETA(2)+THETA(4)*WT
  V=TVVD+ETA(2)
  ;# THE FOLLOWING ARE REQUIRED BY PREDPP
  K=CL/V
  S1=V
  $ERROR
  EMAX=THETA(5)+ETA(3)
  C50=THETA(6)+ETA(4)
  E=EMAX*F/(C50+F)
  Y1=E+ERR(1)
  Y2=F+ERR(2)
  Q=1
  IF (TYPE.EQ.2) Q=0
  Y=Q*Y1+(1-Q)*Y2
  $THETA (0,.0027) (0,.70) .0018 .5 100 20
  $OMEGA .000007 .3 400 16
  $SIGMA BLOCK(2) 4 2.8 8
  $ESTIMATION

Note that the L2 data indicates which ERR random variable is used for the residual error of the data record. Specifically, L2=1 data record on line 2-4, thus the residual errors for these record have variance \(\Sigma_{11}=4\), as shown in the $SIGMA record; L2=2 for the rest data reocrds and the residual errors have variance \(\Sigma_{22}=8\). The two residual error random variables, ERR(1) and ERR(2), are correlated, with correlation coefficient \(\rho=2.8/\sqrt{4\times 8}=0.5\).