Re: Transit Absorption Model in NONMEM
The control stream in the original email is for Nick's Wings for
NONMEM.
It is possible with NONMEM 7.3 to easily convert it to an ordinary
control stream using a new feature,
the REPLACE option of the $ABBR record.
The following code can be placed after the $PROBLEM record:
$abbr replace pop_cl=theta(1), ppv_cl=eta(1)
$abbr replace pop_v=theta(2), ppv_v=eta(2)
$abbr replace pop_ka=theta(3), ppv_ka=eta(3)
$abbr replace pop_mtt=theta(4), ppv_mtt=eta(4)
$abbr replace pop_nt=theta(5)
$abbr replace ruv_cv=theta(6)
$abbr replace ruv_sd=theta(7)
$abbr replace eps1=eps(1)
$abbr replace eps2=eps(2)
I realize that WFN provides other features, but this is a good
opportunity to point out the REPLACE option of 7.3.
Quoted reply history
On Mon, Dec 9, 2013, at 09:13 PM, Xinting Wang wrote:
Dear all,
I have some naive questions to ask you about the implementation of
transit absorption model in nonmem. Below is a demo code from Prof.
Holford in which some part of it I can not understand quite well.
$PROB Transit delay
$DATA sd.csv
$INPUT ID TIME AMT WT DV
$SIM (20050830 NEW) NSUB=1
$EST MAX=9990 SIG=6 ;PRINT=1
METHOD=CONDITIONAL INTERACTION
$THETA
(0,3) ; pop_cl
(1,10) ; pop_v
(0.1,1) ; pop_ka h-1
(0.1,1) ; pop_mtt h
(1,5) ; pop_nt
$OMEGA
0.09 ; ppv_cl
0.09 ; ppv_v
0.09 ; ppv_ka
0.09 ; ppv_mtt
$THETA
(0.001,0.1) ; RUV_CV
(0.001,1) ; RUV_SD
$SIGMA 1 FIX ; EPS1
$SIGMA 1 FIX ; EPS2
$SUBR ADVAN6 TOL=3
$MODEL
COMP (TRANSIT)
COMP (CENTRAL)
$PK
IF (NEWIND.LE.1) THEN
DOSE=0
TDOSE=0
TLAST=0
ENDIF
IF (AMT.GT.0) THEN
DOSE=AMT
TDOSE=TIME
ENDIF
CL=POP_CL*EXP(PPV_CL)
V=POP_V*EXP(PPV_V)
KA=POP_KA*EXP(PPV_KA)
MTT=POP_MTT*EXP(PPV_MTT)
NT=POP_NT
KTR=(NT+1)/MTT
NFAC= SQRT(2*3.1415)*NT**(NT+0.5)*EXP(-NT)
;Very important!
F1=0
$DES
DCP=A(2)/V
RATEIN=KA*A(1)
GUT=DOSE*EXP(-KTR*(T-TLAST))
DADT(1)=GUT*KTR*(KTR*(T-TLAST))**NT/NFAC - RATEIN
DADT(2)=RATEIN - CL*DCP
$ERROR
CP=A(2)/V
Y=CP*(1+RUV_CV*EPS1) + RUV_SD*EPS2
IF (ICALL.EQ.4) THEN
NEPS=0
DOWHILE(Y.LE.0.AND.NEPS.LT.100)
CALL SIMEPS(EPS)
Y=CP*(1+RUV_CV*EPS1) + RUV_SD*EPS2
NEPS=NEPS+1
ENDDO
ENDIF
TLAST=TDOSE
$TABLE ID TIME
CL V KA MTT
CP Y
ONEHEADER NOPRINT FILE=transit.fit
My questions are in the $ERROR part of this code.
1. I noticed that EPS1 and EPS2 is fixed, and the error is simulated
using RUV_CV and RUV_SD as thetas. What is the difference if I use
below equation:
Y=CP*EPS1+EPS2, and let the program to estimate EPS1 and EPS2?
2. What's the purpose of SIMEPS(EPS) here? From my understanding is
that if ICALL equals 4, then conduct a limited number of
Y=CP*(1+RUV_CV*EPS1)+RUV_SD*EPS2.
Thanks to you all for your kind support.
--
Xinting
--
Alison Boeckmann
[email protected]