RE: negative time values
Andreas:
Presently and historically, NONMEM (actually PREDPP) has a restriction against
negative time. Removing this restriction by commenting out a piece of code in
PREDPP and running a test problem indicates that the differential equation
solvers are set up in NONMEM to be able to handle this properly, so there may
be no need for the negative time restriction. Further tests need to be made to
ensure that the PREDPP routines can handle properly multiple doses given in
negative time, etc., and a future version of NONMEM will have the negative time
restriction removed.
Until then, there is a simple work-around for the present NONMEM as well as
previous versions. The following code example from a modification of CONTROL7
demonstrates the use of taking the original TIMEO data item (which is the
original time, with negative times), adding a shift to it (the time of the
first record in each individual), and generating a new TIME data item that
PREDPP has no problem using, as these new times are all non-negative.
The data file itself does not need to be altered. The data file does not need
an extra column for the altered TIME, but just contains the original time
column TIMEO, as identified in the $INPUT record. The $INPUT record also ends
with a TIME item for the 7th column, yet there are only 6 columns in the data
set. NMTRAN will complain that there are more $INPUT items than there are
columns in the data file, so the $WARN DATA=1 is set so only a single warning
shows up (just to remind you). NMTRAN will fill in this non-existent seventh
column with null in FDATA, which NONMEM then uses. This technique creates a
place holder for the altered time that $INFN fills in at run-time. Therefore,
both TIME and TIMEO can be printed in a table. By the way, start_time is
easily retrieved as STIM=TIMEO-TIME, also available for table output.
This technique of using $INFN during ICALL=-1, that is before the estimation
begins, is useful for on-the-fly modification of the input data by NONMEM, and
can be used for other purposes.
$PROB THEOPHYLLINE POPULATION DATA
$WARN DATA=1 ; suppress warnings about missing TIME data item in data file
$INPUT ID DOSE=AMT TIMEO CP=DV WT EVID MDV TIME ; the data file contains
$DATA THEOPPMINUS.csv
$SUBROUTINES ADVAN6 TOL=5
$MODEL COMP=(DEPOT,INITIALOFF,DEFDOSE) COMP=(CENTRAL,DEFOBS,NOOFF)
$INFN
IF (ICALL==1) THEN
DOWHILE(DATA)
IF (NEWIND<2) START_TIME=TIMEO
TIME=TIMEO-START_TIME
ENDDO
ENDIF
$PK
;THETA(1)=MEAN ABSORPTION RATE CONSTANT (1/HR)
;THETA(2)=MEAN ELIMINATION RATE CONSTANT (1/HR)
;THETA(3)=SLOPE OF CLEARANCE VS WEIGHT RELATIONSHIP (LITERS/HR/KG)
;SCALING PARAMETER=VOLUME/WT SINCE DOSE IS WEIGHT-ADJUSTED
KA=THETA(1)+ETA(1)
KE=THETA(2)+ETA(2)
CL=THETA(3)*WT+ETA(3)
S2=CL/KE/WT
STIM=TIMEO-TIME
$THETA (.1,3,5) (.008,.08,.5) (.004,.04,.9)
$OMEGA BLOCK(3) 6 .005 .0002 .3 .006 .4
$DES
DADT(1)=-KA*A(1)
DADT(2)= KA*A(1)-KE*A(2)
$ERROR
Y=F+EPS(1)
$SIGMA .4
$EST MAXEVAL=450 PRINT=5
$COV
$TABLE ID DOSE WT STIM TIMEO TIME NOPRINT FILE=CONTROL7MINUS.TAB
$SCAT (RES WRES) VS TIME BY ID
The following is part if the data file. Note that the altered TIME column
(column 7) is not necessary to be present
1,4.02,-2,.,79.6,1,1
1,.,-2,0.74,.,0,0
1,.,-1.75,2.84,.,0,0
1,.,-1.43,6.57,.,0,0
1,.,-0.88,10.5,.,0,0
1,.,0.02,9.66,.,0,0
1,.,1.82,8.58,.,0,0
1,.,3.1,8.36,.,0,0
1,.,5.03,7.47,.,0,0
1,.,7.05,6.89,.,0,0
1,.,10.12,5.94,.,0,0
1,.,22.37,3.28,.,0,0
2,4.4,-2,.,72.4,1,1
2,.,-2,0,.,0,0
2,.,-1.73,1.72,.,0,0
2,.,-1.48,7.91,.,0,0
2,.,-1,8.31,.,0,0
2,.,-0.08,8.33,.,0,0
2,.,1.5,6.85,.,0,0
2,.,3.02,6.08,.,0,0
2,.,5.03,5.4,.,0,0
2,.,7,4.55,.,0,0
2,.,10,3.01,.,0,0
2,.,22.3,0.9,.,0,0
Robert J. Bauer, Ph.D.
Vice President, Pharmacometrics, R&D
ICON Development Solutions
7740 Milestone Parkway
Suite 150
Hanover, MD 21076
Tel: (215) 616-6428
Mob: (925) 286-0769
Email: [email protected]<mailto:[email protected]>
Web: http://www.iconplc.com/
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of Andreas Krause
Sent: Tuesday, December 17, 2013 3:39 AM
To: nmusers
Subject: [NMusers] negative time values
I wonder if there are particular reasons behind NONMEM not allowing for
negative values in time, noticing that Monolix and Berkeley Madonna accept them.
Are there algorithmic constraints that prevent handling of time less than 0 or
is this just a plausibility check that could be lifted (in a future release)?
It seems obvious that negative times can be useful, for example if there are
sequential pre-treatment measurements and the convention that treatment starts
at time 0.
Thanks for shedding some light on this.
Best regards from (c)old Switzerland,
Andreas
--
Andreas Krause, PhD
Director, Lead Scientist Modeling and Simulation
Department of Clinical Pharmacology
Actelion Pharmaceuticals Ltd. * Gewerbestrasse 16 * CH-4123 Allschwil *
Switzerland
G06.05.W.16.2
[email protected]<mailto:[email protected]> *
http://www.actelion.com
Address for visitors: Hegenheimermattweg 95
The information of this email and in any file transmitted with it is strictly
confidential and may be legally privileged.
It is intended solely for the addressee. If you are not the intended recipient,
any copying, distribution or any other use of this email is prohibited and may
be unlawful. In such case, you should please notify the sender immediately and
destroy this email.
The content of this email is not legally binding unless confirmed by letter.
Any views expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorised to state them
to be the views of the sender's company. For further information about Actelion
please see our website at http://www.actelion.com