From: "Bachman, William (MYD)" bachmanw@iconus.com
Subject: [NMusers] NONMEM Tips #21 - May 13, 2005 - Using more than one line perdat a record -> using more than 20 data items
Date: Fri, May 13, 2005 11:03 am
Occasionally, several data records may be needed to describe one event. An
example of this is the need for more than the 20 data items that NONMEM
allows the user. More than one line per data record is coded by using the
CONT data item in the data file and accessed using EVTREC in the control
stream. All lines prior to the last line in the data record must code for
CONT=1. The last line is coded CONT=0. The data items on the last line of
the data record may be accessed in the conventional manner and correspond to
the items in your $INPUT record. The data items in lines prior to the last
line must be defined using abbreviated code and EVTREC(line_number,
item_number). For example, if AGE is the fourth item on the second line,
the abbvreviated code would be:
" AGE=EVTREC(2,4)
Example control stream (based on the control5 control stream and THEOPP data
file):
;Model Desc: using more than one line per record
;Project Name: iqual
;Project ID: GM00-004
$PROB RUN# cont THEOPHYLLINE POPULATION DATA
$INPUT C ID TIME AMT DV SEX LAB CONT
$DATA THEOPPcont.csv IGNORE=C
$SUBROUTINES ADVAN2
$PK
" WT=EVTREC(1,7)
CALLFL=1
KA=THETA(1)+ETA(1)
K=THETA(2)+ETA(2)
CL=THETA(3)*WT+ETA(3)
SC=CL/K/WT
$THETA
(.1,3,5) ;[KA]
(.008,.08,.5) ;[K]
(.004,.04,.9) ;[CL]
$OMEGA BLOCK(3)
6 ;[A]
.005 ;[F]
.0002;[A]
.3 ;[F]
.006 ;[F]
.4 ;[A]
$ERROR
Y=F+EPS(1)
$SIGMA
.4 ;[A]
$EST MAXEVAL=450 PRINT=5
$COV
First individual of the data file:
C,Data Desc: using more than one line per record,,,,,,
C,ID,TIME,AGE,STDY,FORM,WT,CONT
C,ID,TIME,AMT,DV,SEX,LAB,CONT
,1,0,22,802,0,79.6,1
,1,0,4.02,.,1,3,0
,1,0,22,802,0,.,1
,1,0,.,0.74,1,3,0
,1,0.25,22,802,0,.,1
,1,0.25,.,2.84,1,3,0
,1,0.57,22,802,0,.,1
,1,0.57,.,6.57,1,3,0
,1,1.12,22,802,0,.,1
,1,1.12,.,10.5,1,3,0
,1,2.02,22,802,0,.,1
,1,2.02,.,9.66,1,3,0
,1,3.82,22,802,0,.,1
,1,3.82,.,8.58,1,3,0
,1,5.1,22,802,0,.,1
,1,5.1,.,8.36,1,3,0
,1,7.03,22,802,0,.,1
,1,7.03,.,7.47,1,3,0
,1,9.05,22,802,0,.,1
,1,9.05,.,6.89,1,3,0
,1,12.12,22,802,0,.,1
,1,12.12,.,5.94,1,3,0
,1,24.37,22,802,0,.,1
,1,24.37,.,3.28,1,3,
nmconsult@globomaxnm.com
GloboMax
The Strategic Pharmaceutical Development Division of ICON plc
7250 Parkway Drive, Suite 430
Hanover, MD 21076
Voice: (410) 782-2205
FAX: (410) 712-0737
-------------------------------------------------------------------
|
|
| CONT DATA ITEM
|
|
|
------------------------------------------------------------------
MEANING: Continuation (CONT) data item for PREDPP
CONTEXT: $INPUT record and NONMEM data set
USAGE:
$INPUT ... CONT ...
DISCUSSION:
CONT labels PREDPP's continuation (CONT) data item. The continuation
data item is optional. The CONT data item allows a PREDPP event
record to span several data records. It is useful when more than 20
data items are needed to describe a single event. When the CONT data
item is not defined on the $INPUT record, every event record consists
of a single data record.
Values are:
0 This is the last or only data record of the event record.
1 This and the succeeding record are both members of the same event
record. MDV must be 1.
PREDPP ignores records having CONT=1, except to pass them to the PK
and ERROR routines as part of the complete event record. Values of
PREDPP data items such as EVID, AMT, etc., are significant only on the
final record of each event record, i.e., on records having CONT=0.
With NM-TRAN abbreviated code, values on data records having CONT=1
are not available for use as right-hand quantities, i.e., abbreviated
code cannot reference the values in data records other than the last
of each event record. (It would be possible to reference such values
using verbatim code, however). When NM-TRAN performs time translation
or ii conversion (see date, time, ii), it does so only for the event
records having CONT=0.
REFERENCES: Guide VI, section II (p. 5), V.A (p. 55), V.I (p. 62)
REFERENCES: Guide IV, section V.B (p. 61), V.C.5 (p. 70)
(This tip is supplied "gratis" and without implicit or explicit support from
GloboMax divison of ICON plc).
Previous tips may be found in the NONMEM Repository@GloboMax:
ftp://ftp.globomaxnm.com/Public/nonmem/tips/
See the index.txt file for a listing of previous tips.
***************************************************************************
If you have a "tip" or a better way to do things, by all means, feel free to
post them! One of the reasons for doing this (other than good PR for
GloboMax), is to stimulate discussion. We at GloboMax can learn from your
experience as well. Do you have a "tip" you would like to share, but would
prefer to remain anonymous? If so, you may forward it to us and your
identity will be withheld. Distribution as a "NONMEM Tip" will be at
the discretion of nmconsult@globomaxnm.com.
NONMEM Tips #21 - May 13, 2005 - Using more than one line perdat a record -> using more than 20 data items
3 messages
3 people
Latest: May 27, 2005
From: Ludden, Thomas (MYD)
Subject: RE: [NMusers] NONMEM Tips #21 - May 13, 2005 - Using more than one line per dat a record -> using more than 20 data items
Date: Friday, May 13, 2005 11:49 AM
Bill,
There is an important correct to your tip. Verbatim code, not abbreviated
code, is required.
Tom
From: "Nick Holford"
Subject: Re: [NMusers] NONMEM Tips #21 - What Bill didn't tell you
Date: Fri, May 27, 2005 8:27 am
Thanks to those of you sent me this NONMEM Tip.
Its a bit of a mystery how NM-TRAN/NONMEM interpret the data items when CONT=1. I am
unclear what is done with positions that correspond to data items with special
meaning in the record with CONT=0.
It seems that every record (no matter with CONT=0 or CONT=1) for the same individual
must have the same ID. The following data fragment makes NONMEM think there are 24
subjects and the run finishes with a very different objective function.
C Data Desc: using more than one line per record
C JUNK JNK2 AGE STDY FORM WT CONT
C ID TIME AMT DV SEX LAB CONT
-1 -1 22 802 0 79.6 1
1 0 4.02 . 1 3 0
-1 -1 22 802 0 . 1
1 0 . 0.74 1 3 0
-1 -1 22 802 0 . 1
1 0.25 . 2.84 1 3 0
-1 -1 22 802 0 . 1
1 0.57 . 6.57 1 3 0
-1 -1 22 802 0 . 1
1 1.12 . 10.5 1 3 0
-1 -1 22 802 0 . 1
1 2.02 . 9.66 1 3 0
-1 -1 22 802 0 . 1
1 3.82 . 8.58 1 3 0
-1 -1 22 802 0 . 1
1 5.1 . 8.36 1 3 0
-1 -1 22 802 0 . 1
1 7.03 . 7.47 1 3 0
-1 -1 22 802 0 . 1
1 9.05 . 6.89 1 3 0
-1 -1 22 802 0 . 1
1 12.12 . 5.94 1 3 0
-1 -1 22 802 0 . 1
1 24.37 . 3.28 1 3 0
On the other hand it seems that the TIME data item when CONT=1 is ignored because
NONMEM will complain if you use a negative TIME with $PK. Based on rather limited
testing it seems the only required thing is to have ID on every record for a given
subject. Some data items on records with CONT=1 are looked at by NM-TRAN and give
spurious warnings (e.g. DV and MDV; see below) but not by NONMEM.
Using the control stream and data fragment provided in Tip #21 I get the following
output. It seems that NM-TRAN is trying to interpret DV and MDV when it reads a
record with CONT=1. These warnings can be switched off with $WARN DATA=NONE if they
annoy you.
WARNINGS AND ERRORS (IF ANY) FOR PROBLEM 1
(WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.
(DATA WARNING 5) RECORD 1, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 3, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 5, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 7, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 9, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 11, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 13, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 15, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 17, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 19, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 21, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
(DATA WARNING 5) RECORD 23, DATA ITEM 5: 802
THE DV DATA ITEM IS POSITIVE, BUT THE MDV DATA ITEM IS 1
df /fltconsistency /optimize:4 /fast /Fecont FSUBS.for @link.txt
NONMEM cont...
MONITORING OF SEARCH:
0ITERATION NO.: 0 OBJECTIVE VALUE: 18.101 NO. OF FUNC. EVALS.: 6
CUMULATIVE NO. OF FUNC. EVALS.: 6
PARAMETER: 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E
+00 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00
GRADIENT: -0.1334E+03 -0.4117E+03 0.1506E+04 0.6870E+01 0.3766E+01 -0.1760E
+02 0.4215E+02 -0.7837E+02 -0.1521E+03 -0.1788E+02
0ITERATION NO.: 47 OBJECTIVE VALUE: -3.897 NO. OF FUNC. EVALS.:11
CUMULATIVE NO. OF FUNC. EVALS.: 455
PARAMETER: 0.1302E+00 -0.6904E-01 -0.6362E-01 0.2537E+00 -0.5180E+00 -0.8572E
-01 -0.3027E-02 -0.2925E-02 0.5712E-04 0.6498E-01
GRADIENT: -0.1154E+02 0.1046E+03 -0.2030E+03 0.4912E+01 0.2036E+01 -0.5541E
+01 -0.7725E+01 0.1166E+01 0.3292E+01 0.1007E+01
--
Nick Holford, Dept Pharmacology & Clinical Pharmacology
University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand
email:n.holford@auckland.ac.nz tel:+64(9)373-7599x86730 fax:373-7556
http://www.health.auckland.ac.nz/pharmacology/staff/nholford/