Dear Paul,
to avoid this, use your dataset, use the final estimated parameters and
use $EST, but set MAXEVAL=0. This way, you can estimate all your IDs' AUCs
simultaneously with the right parameters for each one. I always do this if
I use ADVAN4 for estimation of parameters. Then if I want to compute AUC I
use ADVAN 6 and add an AUC compartment. Below is a code that calculates
CMAX, AUC, time above IC50 and AUC above IC50 for different times.
Best wishes
Nele
$SUBROUTINES ADVAN6 TOL=3
$MODEL
COMP=(GUT)
COMP=(CENTRAL)
COMP=(PERIPH)
COMP=(TIMEOVER)
COMP=(AUCOVER)
COMP=(AUC)
COMP=(TIMEOV2)
COMP=(AUCOVER2)
COMP=(AUC2)
$PK
"FIRST
" COMMON /PRCOMG/ IDUM1,IDUM2,IMAX
" INTEGER IDUM1,IDUM2,IMAX
" IMAX=500000
;
TVCL=THETA(1)
CL=TVCL
;
TVV2=THETA(2)
V2=TVV2
;
TVQ=THETA(3)
Q=TVQ
;
TVV3=THETA(4)
V3=TVV3
;
TVKA=THETA(5)
KA=TVKA
TVF1=THETA(6)
F1=TVF1*EXP(ETA(1))
S2=V2
K20=CL/V2
K23=Q/V2
K32=Q/V3
K12=KA
$DES
IF(TIME.EQ.0) THEN
CMAX=0
TMAX=0
ENDIF
CC=A(2)/V2
IF(CC.GT.CMAX) THEN
CMAX= CC
TMAX= T
ENDIF
IC50=0.0075
RT=0
IF(CC.GT.IC50) RT=1
DADT(1)=-KA*A(1)
DADT(2)= KA*A(1)-K23*A(2)+K32*A(3)-K20*A(2)
DADT(3)= K23*A(2)-K32*A(3)
DADT(4)= RT ;time above IC50
IF (T.GT.24) DADT(4)=0
DADT(5)= RT*(CC-IC50) ;AUC over IC50
IF (T.GT.24) DADT(5)=0
DADT(6)= A(2)/V2
IF (T.GT.24) DADT(6)=0
DADT(7)=0
IF (T.GE.48) DADT(7)=RT
DADT(8)=0
IF (T.GE.48) DADT(8)=RT*(CC-IC50)
DADT(9)=0
IF (T.GE.48) DADT(9)=A(2)/V2
;
$ERROR
IPRED=F
DEL=0
IF (IPRED.EQ.0) DEL=0.0001
W=F
IRES=DV-IPRED
IWRES=IRES/(W+DEL)
Y=F+SQRT(THETA(8)*THETA(8)+THETA(7)*THETA(7)*F**2)*EPS(1)
CC2=A(2)/V2
TOI1=A(4)
AOI1=A(5)
AUC1=A(6)
TOI2=A(7)
AOI2=A(8)
AUC2=A(9)
;
$THETA
...
;
$OMEGA
...
;
$SIGMA
1 FIX ;prop.error
;
$EST METHOD=1 INTERACTION MAXEVAL=0 PRINT=5 NOABORT MSFO=msf001
$TABLE ID TIME CL V2 V3 Q KA F1 CC2 TOI1 TOI2 AOI1 AOI2
AUC1 AUC2 CMAX NOPRINT ONEHEADER FILE=notab1
_________________________
Dr. Nele Plock
Bayer Schering Pharma AG
Drug Metabolism & Pharmacokinetics
Development Pharmacokinetics
Scientific Expert Development Pharmacokinetics
D- 13342 Berlin
Phone : +49-30-468 15146
Fax: +49-30-468 95146
[EMAIL PROTECTED]
http://www.bayerscheringpharma.de
Vorstand: Arthur J. Higgins, Vorsitzender | Werner Baumann, Andreas Busch,
Ulrich Köstlin, Kemal Malik, Gunnar Riemann
Vorsitzender des Aufsichtsrats: Werner Wenning
Sitz der Gesellschaft: Berlin | Eintragung: Amtsgericht Charlottenburg 93
HRB 283
Paul Hutson <[EMAIL PROTECTED]>
Gesendet von: [EMAIL PROTECTED]
07.01.2008 06:59
Bitte antworten an
[EMAIL PROTECTED]
An
[email protected]
Kopie
Thema
[NMusers] AUC Calculation in Simulation with and without EST
I have data from PO, IP, and SQ(pump) infusions of this compound that I am
modeling using 2-3 samples per mouse (30 critters worth), and the fits for
a 1 cmpt are pretty good. In order to obtain a smooth plot to compare to
the observed data, I have run N=1 simulations for a single "subject"
(ID=1) using the bootstrapped parameters from all animals (each receiving
drug via a single route).
My question for the NMUSERS is this. When I just use $SIM without $EST,
my AUC calculated by F1*AMT/CL is wildly different than the AUC I obtain
by a quick trapezoidal check of my PRED column in the output file. When I
use both $SIM and $EST as shown below, the integrated and trapezoidal AUCs
agree. Why is there a difference? I presume that it is due to the use of
a dummy value of "1" for DV throughout my initial data file, but I don't
understand why. Thanks as always.
(csv file follows ctl)
(As always, any other suggestions to spruce up the code or my approach is
appreciated.) Paul
$PROBLEM CYCLOPAMIDE
$INPUT ID TIME AMT RATE ADDL II PMP DV CMP RTE EVID
$DATA ..\Lipinski_24PO.CSV IGNORE=#
$SIMULATION (1111)
$SUBROUTINES ADVAN2 TRANS2
$PK
ALAG1=0
RTE1=0
RTE2=0
RTE3=0
IF(RTE.EQ.1) RTE1=1
IF(RTE.EQ.2) RTE2=1
IF(RTE.EQ.3) RTE3=1
F1=1
IF(RTE.EQ.1) F1=THETA(1); PO
IF(RTE.EQ.2) F1=THETA(2); IP
TVKA=THETA(3); GUT
IF(RTE.EQ.2) TVKA=THETA(4); IP
IF(RTE.EQ.3) TVKA=THETA(5); SQ PUMP
CL=THETA(6)*EXP(ETA(1)); CL
V=THETA(7)*EXP(ETA(2)); V
KA=TVKA;*EXP(ETA(3));
;IF(RTE.EQ.3) ALAG1=THETA(8)*EXP(ETA(4))
K=CL/V
T12=0.693/K
AUC=F1*AMT/CL
TMAX=(LOG(KA)-LOG(K))/(KA-K)
CMAX=(F1*AMT/V)*EXP(-K*TMAX)
CAVE=F1*AMT/(CL*24)
S2=V
$ERROR
IPRE = F
W1=F
DEL = 0
IF(IPRE.LT.0.001) DEL = 1
IRES = DV-IPRE; NEGATIVE TREND IS OVERESTIMATING IPRED WRT DV
IWRE = IRES/(W1+DEL)
Y=IPRE+EPS(1)
$THETA 0.642; F1PO
$THETA 1.267; F1IP
$THETA 0.472; KAGUT
$THETA 8.879; KAIP
$THETA 4.564; KASQ
$THETA 0.146; CL
$THETA 0.289; V
$OMEGA 0.313; ETACL
$OMEGA 0.964; EtTAV
$SIGMA 0.178; SIG1
$EST METH=1 INT NOABORT MAXEVAL=9999 POSTHOC
$TABLE ID TIME AUC AMT K KA CL V F1 RTE ETA1 ETA2
NOPRINT ONEHEADER FILE=CycloSim.fit
#AMT in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.,.,.,.,.,1,2,1,0
1,21,.,.,.,.,.,1,2,1,0
1,22,.,.,.,.,.,1,2,1,0
1,23,.,.,.,.,.,1,2,1,0
1,24,.,.,.,.,.,1,2,1,0
1,25,.,.,.,.,.,1,2,1,0
1,26,.,.,.,.,.,1,2,1,0
1,27,.,.,.,.,.,1,2,1,0
1,28,.,.,.,.,.,1,2,1,0
1,29,.,.,.,.,.,1,2,1,0
1,30,.,.,.,.,.,1,2,1,0
1,31,.,.,.,.,.,1,2,1,0
1,32,.,.,.,.,.,1,2,1,0
1,33,.,.,.,.,.,1,2,1,0
1,34,.,.,.,.,.,1,2,1,0
1,35,.,.,.,.,.,1,2,1,0
1,36,.,.,.,.,.,1,2,1,0
1,37,.,.,.,.,.,1,2,1,0
1,38,.,.,.,.,.,1,2,1,0
1,39,.,.,.,.,.,1,2,1,0
1,40,.,.,.,.,.,1,2,1,0
1,41,.,.,.,.,.,1,2,1,0
1,42,.,.,.,.,.,1,2,1,0
1,43,.,.,.,.,.,1,2,1,0
1,44,.,.,.,.,.,1,2,1,0
1,45,.,.,.,.,.,1,2,1,0
1,46,.,.,.,.,.,1,2,1,0
1,47,.,.,.,.,.,1,2,1,0
1,48,.,.,.,.,.,1,2,1,0
--
Paul R. Hutson, Pharm.D.
Associate Professor
UW School of Pharmacy
777 Highland Avenue
Madison WI 53705-2222
Tel 608.263.2496
Fax 608.265.5421
Pager 608.265.7000, p7856