IGNORE/ACCEPT data records
The options $DATA IGNORE=(list) and $DATA ACCEPT=(list)
include and exclude selection criteria in the NONMEM data set, respectively. The list has format:
|
|
where each cond is a test of a data item "label operator value".
Comma , is equivalent to .OR. operator, and the .AND. or .NOT.
operators are not permitted. One may express .AND. such as in
|
|
by negating both sides:
|
|
thus
|
|
But logical operators inside parenthesis are not permitted, so that the following cannot be coded:
|
|
Even if negated, this is:
|
|
which is:
|
|
There is still an .AND. inside parentheses.
There is a workaround that takes advantage of the fact that A takes numeric values and there are no values between 1 and 2.
|
|
can be implemented with an "or":
|
|
The following are equivalent:
|
|
This workaround cannot handle continuous A or more complicated conditions.
With NONMEM through 7.3, two separate NONMEM problems can be used, in
two separate runs, for a complicated condition. In the first problem,
abbreviated code is used to append a new variable to the data with a
value indicating ignore/accept; in the second run the variable is used
in the $DATA statement to choose from the data set.
Suppose ACC is the variable that is to have values 0/1 for ignore/accept. The desired code is:
|
|
The above can be coded using the FORTRAN language. But NM-TRAN abbreviated code is a subset of FORTRAN. Logical operators .NOT., .AND., .OR. may not be used within parentheses. There are two workarounds.
One is to clear the parentheses:
|
|
this is always possible, no matter how complicted the conditional expression.
The second is to use several statements. There are may ways to do this. In the following, the .AND. of multiple conditions is false if any of the conditions is false.
|
|
In prob1.ctl, the first problem appends ACC to the (new) data set. In prob2.ctl, the $DATA record uses ACC to select records.
All required data items for NONMEM (and PREDPP, if used) must be present in the original data file testab.dat. The control stream for the first run:
|
|
The control stream for the second run:
|
|
With NONMEM 7.4, it is possible to combine both problems into one
NONMEM run using the $TABLE EXCLUDE_BY list option. If
any variable in list is non-zero, the record is excluded from the table
file. In that case the $DATA ACCEPT/IGNORE option is not needed.
Because the table does not exist when NM-TRAN processes the second
problem in the control stream, $DATA .. NOOPEN is needed and a
format specification is needed.
|
|
Here is a fragment of the data testab.dat
|
|