Re: Problem to implement a change in transfer rate after event during measurement period
Dear Andreas
MTIME is used for estimation of an model event time. Hence you use it if
you do not know the time, but it appears you do know the time. If the
time is the same for all individuals, and I would simply use the
following code:
IF(TIME.LE. xxx) THEN
K12=THETA(..)
ELSE
K12=THETA(..)
ENDIF
If the time is different for different individuals, perhaps you can add
a column with a flag of some sort in your dataset where this event
occurs and replace TIME in the above code with your flag. Make sure you
put the flag at the event time, and for all the subsequent records for
that individual. So all your records before EVID=2 in your dataset can
have FLAG=0, then from EVID =2 onwards you put FLAG=1 and code your
control stream as follows:
IF(FLAG.EQ.0) K12=THETA(..)
IF(FLAG.EQ.1) K12=THETA(..)
Hope this helps.
Emmanuel
>>> Steingötter Andreas 07/27/10 7:11 PM >>>
Dear NONMEM users
I would like to include a change in a rate constant after an event that
occurred at a defined time during the measurements for each individual.
As you can see from the data example listed below, the model used is a
two compartment model with a bolus input. I now use ADVAN7, however I
understand that ADVAN2 might do as well.
To achieve my goal, I included a record at that given time point with
EVID=2, MVD=1 and DV = NA. From some examples in the users network I
understood that I can use the MTIME parameter to implement this discrete
change in K12.
I am not sure if I correctly understood the use of MTIME and MTDIFF and
if I really need to introduce another theta for MTIME.
I hope someone with more experience on this topic can give me a hint or
suggestion on how to best implement such a problem.
Many thanks for any help
Andreas
$PROB 2 Compartments Meal and PDR
$DATA penta_BT-Meal-pgs_evid.txt IGNORE=C
$INPUT ID,TIME,DV,CMT,AMT,RATE,MDV,OCC,EVID
$SUBROUTINES ADVAN7
$Model COMP = Meal COMP = PDR
$PK
IF (EVID.EQ.2) INFTIME = TIME
MU_INF = THETA(5)
ET_INF = ETA(4)
MTIME(1) = DEXP(MU_INF + ET_INF)+INFTIME
MTDIFF = 1
MU_K12 = THETA(1)+(1-MPAST(1))+THETA(4)*MPAST(1) ; new meal rate
constant theta(5) after switching off the penta infusion
ET_K12 = ETA(1)
MU_K20 = THETA(2)
ET_K20 = ETA(2)
MU_F2 = THETA(3)
ET_F2 = ETA(3)
K12 = DEXP(MU_K12 + ET_K12) ; meal to PDR
K20 = DEXP(MU_K20 + ET_K20) ; elimination
F2 = MU_F2 + EXP(ET_F2) ; bioavailability PDR
S2 = F2
CL = K20*S2
$ERROR
Y=F*(1+ERR(1))+ERR(2)
IPRED = F
IRES = DV-IPRED ; individual-specific residual
IWRES = IRES ; individual-specific weighted residual
$THETA
(-10.,-4., 0.) ;logK12
(-10.,-2., 0.) ;logK20
(0.0, 0.4, 5.0) ;F2
(-10.,-4., 0.) ;logK12_2
(-5.,0.1, 5.) ;logmtime
$OMEGA
0.3 ;logETA_K12
0.3 ;logETA_K20
0.2 ;ETA_F2
0.1 ;ETA_inftime
$SIGMA 1. 20.
ID TIME DV CMT AMT RATE MDV OCC EVID
1 0.000 . 1 500 0 1 0 1
1 0.000 5.00e+02 1 . . 0 0 0
1 0.736 0.00e+00 2 . . 0 0 0
1 2.177 5.04e-01 2 . . 0 0 0
1 7.008 4.87e+00 2 . . 0 0 0
1 12.052 1.05e+01 2 . . 0 0 0
1 14.000 4.09e+02 1 . . 0 0 0
1 16.768 1.09e+01 2 . . 0 0 0
1 20.000 3.25e+02 1 . . 0 0 0
1 23.942 9.63e+00 2 . . 0 0 0
1 24.000 3.19e+02 1 . . 0 0 0
1 28.780 9.24e+00 2 . . 0 0 0
1 29.000 3.08e+02 1 . . 0 0 0
1 33.540 8.48e+00 2 . . 0 0 0
1 34.000 2.92e+02 1 . . 0 0 0
1 39.000 2.97e+02 1 . . 0 0 0
1 43.293 8.41e+00 2 . . 0 0 0
1 44.000 2.79e+02 1 . . 0 0 0
1 45.671 7.81e+00 2 . . 0 0 0
1 48.219 8.15e+00 2 . . 0 0 0
1 50.000 2.70e+02 1 . . 0 0 0
1 50.659 8.14e+00 2 . . 0 0 0
1 54.000 2.57e+02 1 . . 0 0 0
1 56.000 . 1 . . 1 0 2
1 59.000 2.70e+02 1 . . 0 0 0
1 64.000 2.55e+02 1 . . 0 0 0
----------------------------------------------------------------------------------------------------------------------------------------
Andreas Steingötter, PhD
Institut for Biomedical Engineering Klinik für Gastroenterologie und
Hepatologie
Divisions of Bioimaging and MRI Technology Department Innere Medizin
University and ETH Zurich Universitätsspital
Gloriastrasse 35 Rämistrasse 100
CH - 8092 Zurich CH - 8091 Zürich
Tel. +41 44 255 5684 Tel. +41 44 255 5684
Fax +41 44 632 1193 Fax +41 44 255 4591
Email [email protected] Email [email protected]
###
UNIVERSITY OF CAPE TOWN
This e-mail is subject to the UCT ICT policies and e-mail disclaimer
published on our website at
http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from
+27 21 650 4500. This e-mail is intended only for the person(s) to whom
it is addressed. If the e-mail has reached you in error, please notify
the author. If you are not the intended recipient of the e-mail you may
not use, disclose, copy, redirect or print the content. If this e-mail
is not related to the business of UCT it is sent by the sender in the
sender's individual capacity.
###