RE: Time after dose
Hi Siwei,
Here is an example on how to get the TAD out in to table, that I've use for
tutorial and which is a slight modification of that found on the Globamax
webpage.
http://www.globomaxnm.com/nonmem_tip3.htm
Best Regards
Kim Kristensen
ID,TIME,DV,AMT,II,ADDL,EVID,CMT,MDV
1,0,0,4000,12,2,1,1,1
1,1,0.1,0,0,0,0,2,0
1,11,0.1,0,0,0,0,2,0
1,13,0.1,0,0,0,0,2,0
1,35,0,4000,0,0,1,1,1
1,37,0.1,0,0,0,0,0,0
2,0,0,4000,12,2,1,1,1
2,3,0.1,0,0,0,0,2,0
2,8,0.1,0,0,0,0,2,0
2,15,0.1,0,0,0,0,2,0
2,35,0,4000,0,0,1,1,1
2,39,0.1,0,0,0,0,2,0
$PROBLEM Creating TAD
$INPUT ID TIME DV AMT II ADDL EVID CMT MDV
$DATA TAD.csv IGN=@
$SUBROUTINES ADVAN2 TRANS2
$PK
;replace this TAD code with yours for ADDL TAD's
IF(NEWIND.LT.2) THEN
IFL=0
TAD=0.0
ENDIF
IF(EVID.EQ.1.OR.EVID.EQ.4) THEN
TDOS=TIME
TAD=0.0
IFL=1
ENDIF
IF(IFL.EQ.1.AND.EVID.NE.1.AND.EVID.NE.4)TAD=TIME-TDOS
TVCL=THETA(1) ;Population CL
TVV=THETA(2) ;Population V2
TVKA=THETA(3) ;Population KA
CL = TVCL*EXP(ETA(1)) ; Individual CL
V = TVV*EXP(ETA(2)) ; Individual V2
KA = TVKA*EXP(ETA(3)) ; Individual KA
S2=V ; Scaling
;Secondary parameters
K=CL/V
THAL=0.693/K
AUC=AMT/CL
$ERROR
IPRED = F
IRES = DV-IPRED
DEL = 0
IF (IPRED.EQ.0) DEL=1
IWRES = (1-DEL)*IRES/(IPRED+DEL)
Y = F*(1+ERR(1))
$THETA (0,3.5,) ;CL pop
$THETA (0,4.,) ;V pop
$THETA (0,.6,) ;KA pop
$OMEGA .09 ; CL BSV
$OMEGA .09 ; V BSV
$OMEGA .09 ; KA BSV
$SIGMA .09 ; Propportional Error
;$EST MAX=9999 METHOD=1 INTERACTION NOABORT POSTHOC PRINT=5
;$COV PRINT=E
$TABLE ID TIME DV AMT II ADDL EVID CMT MDV TAD
IPRED IRES IWRES ETA1 ETA2 ETA3
NOPRINT ONEHEADER FILE=sdtab1 ;Standard table - Goodness of fit
$TABLE ID CL V KA
NOPRINT ONEHEADER FILE=patab1 ;Standard first line table
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of siwei Dai
Sent: 05 juli 2012 18:17
To: [email protected]
Subject: [NMusers] Time after dose
Hi, Everyone:
I am having trouble with getting the correct output of TAD (time after dose)
and hoping to get your suggestions.
Here is a brief description of my dataset: drug was given multiple dosing every
12 hours. All the dosing events were recorded in the input file. Observations
were taken right before the last dose (predose), and 0.5, 1, 2, 4, 8 hrs
post-dose.
I have used this code to calculate the TAD
IF(AMT.GT.0) THEN
TDOS=TIME
TAD=0.0
ENDIF
IF (AMT.EQ.0) TAD=TIME-TDOS
In the output, the TADs calculated for the predose observation, instead of
being a negative value, are closed to 12 and larger than the one for 8 hrs
observations. It is obviously wrong and it give me wrong individual plots.
I tried to find useful information in NM archive but cannot find any that
suitable for my situation.
Any suggestions are greatly appreciated! Thank you in advance for your help!
Siwei