AUC Calculation in Simulation with and without EST

3 messages 3 people Latest: Jan 09, 2008
Dear Paul and NM users, having recently benefitted from your kind input it is time that I also provide some of the little sense I still have: When Paul calculates the AUC with just one simulation without estimation, he calculates the AUC with one possible set of parameters (here just CL). That estimate could indeed be vastly different from the population mean which is used to calculate PRED in the TABLE: AUC based on simulated CL and AUC based on PRED disagree. When he runs an estimation after the simulation, clearance will be estimated based also on the initial population values given in the $THETA records ansd based on the simulated data, and PRED will be different from the PRED listed in the TABLE when there was no estimation: AUC based on indiv parameters and AUC based on PRED agree. You all think about that. I could be wrong as it is Monday morning, quite early. Joachim __________________________________________ Joachim GREVEL, Ph.D. MERCK SERONO International S.A. Exploratory Medicine 1202 Geneva Tel: +41.22.414.4751 Fax: +41.22.414.3059 Email: [EMAIL PROTECTED] Paul wrote: 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 micromoles,,,,,,,,,, #TIME in hours,,,,,,,,,, #DV in microMolar,,,,,,,,,, #COMP: 1 for PO_ 2 for blood_3 for IP_4 for SC,,,,,,,,,, #RTE: 1 for PO 2 for IP 3 for SQ Pump,,,,,,,,,, #ID,TIME,AMT,RATE,ADDL,II,DUR,DV,COMP,RTE,EVID 1,0,0.608,.,.,.,.,.,1,1,1 1,0.1,.,.,.,.,.,1,2,1,0 1,0.2,.,.,.,.,.,1,2,1,0 1,0.3,.,.,.,.,.,1,2,1,0 1,0.4,.,.,.,.,.,1,2,1,0 1,0.5,.,.,.,.,.,1,2,1,0 1,0.6,.,.,.,.,.,1,2,1,0 1,0.7,.,.,.,.,.,1,2,1,0 1,0.8,.,.,.,.,.,1,2,1,0 1,0.9,.,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.,.,.,.,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 ----------------------------------------- This message and any attachment are confidential, may be privileged or otherwise protected from disclosure and are intended only for use by the addressee(s) named herein. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Merck Serono does not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. If verification is required, please request a hard-copy version. Merck Serono does not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith.
Dear Paul, When using $SIM only, the AUC will be estimated based on the simulated parameter values including the ETA's. With PRED or if you do $SIM+$EST (without POSTHOC), the AUC will be based on parameters with ETA set to zero. Best regards, Mats Mats Karlsson, PhD Professor of Pharmacometrics Div. of Pharmacokinetics and Drug Therapy Dept. of Pharmaceutical Biosciences Faculty of Pharmacy Uppsala University Box 591 SE-751 24 Uppsala Sweden phone +46 18 471 4105 fax +46 18 471 4003 [EMAIL PROTECTED] _____
Quoted reply history
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Hutson Sent: Monday, January 07, 2008 07:00 To: [email protected] Subject: [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 micromoles,,,,,,,,,, #TIME in hours,,,,,,,,,, #DV in microMolar,,,,,,,,,, #COMP: 1 for PO_ 2 for blood_3 for IP_4 for SC,,,,,,,,,, #RTE: 1 for PO 2 for IP 3 for SQ Pump,,,,,,,,,, #ID,TIME,AMT,RATE,ADDL,II,DUR,DV,COMP,RTE,EVID 1,0,0.608,.,.,.,.,.,1,1,1 1,0.1,.,.,.,.,.,1,2,1,0 1,0.2,.,.,.,.,.,1,2,1,0 1,0.3,.,.,.,.,.,1,2,1,0 1,0.4,.,.,.,.,.,1,2,1,0 1,0.5,.,.,.,.,.,1,2,1,0 1,0.6,.,.,.,.,.,1,2,1,0 1,0.7,.,.,.,.,.,1,2,1,0 1,0.8,.,.,.,.,.,1,2,1,0 1,0.9,.,.,.,.,.,1,2,1,0 1,1,.,.,.,.,.,1,2,1,0 1,1.2,.,.,.,.,.,1,2,1,0 1,1.4,.,.,.,.,.,1,2,1,0 1,1.6,.,.,.,.,.,1,2,1,0 1,1.8,.,.,.,.,.,1,2,1,0 1,2,.,.,.,.,.,1,2,1,0 1,2.2,.,.,.,.,.,1,2,1,0 1,2.4,.,.,.,.,.,1,2,1,0 1,2.6,.,.,.,.,.,1,2,1,0 1,2.8,.,.,.,.,.,1,2,1,0 1,3,.,.,.,.,.,1,2,1,0 1,4,.,.,.,.,.,1,2,1,0 1,5,.,.,.,.,.,1,2,1,0 1,6,.,.,.,.,.,1,2,1,0 1,7,.,.,.,.,.,1,2,1,0 1,8,.,.,.,.,.,1,2,1,0 1,9,.,.,.,.,.,1,2,1,0 1,10,.,.,.,.,.,1,2,1,0 1,11,.,.,.,.,.,1,2,1,0 1,12,.,.,.,.,.,1,2,1,0 1,13,.,.,.,.,.,1,2,1,0 1,14,.,.,.,.,.,1,2,1,0 1,15,.,.,.,.,.,1,2,1,0 1,16,.,.,.,.,.,1,2,1,0 1,17,.,.,.,.,.,1,2,1,0 1,18,.,.,.,.,.,1,2,1,0 1,19,.,,,,,1,2,1,0 1,20,.,.,.,.,.,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
Title: Paul R Many thanks to Mats, Nele, and Joachim for their guidance. Nele's suggestion to use $DES to calculate AUC mirror's Joga's suggestion for this in the past, but has the interesting twist of closing additions to it after 24 hours. I did not think this the best approach (vs F1*AMT/CL) in my case because each mouse had so few samples. With respect to Mats' suggestion to use $SIM + $EST without POSTHOC, I noted that there is not a difference in my output TABLE if it is left in the $EST line (but then my MAXEVAL was =9999. When I changed to $SIM + $EST MAXEVAL=0, the AUC was different than my trapezoidal, as below: $SIM $EST MaxEval PostHoc CL F1*AMT/CL AUCtrapezoid VarETACL YES NO N/A N/A 0.464 0.531 1.68 1.15 YES YES 9999 YES 0.838 0.480 0.482 0.00 YES YES 9999 NO 0.838 0.480 0.482 0.00 YES YES 0 YES 0.443 0.556 1.68 1.1 YES YES 0 NO 0.443 0.556 1.68 1.1 [Initial estimates for the above are CL=0.147, F1=0.405, AMT=0.608, $OMEGA .238 SO AUC = 1.68] My mistake it seems was to have left METHOD=1 (FOCE) in the $EST term. That (I think) is why the presence or absence of POSTHOC had no effect and confused me. And it is why I obtained new estimates of CL and thus the integrated (F1*AMT/CL) AUC. My understanding is that the varETAs are 0 because I only simulated one, hypothetical individual. When I corrected $EST to the FO method, I obtained the following for an N=1 $SIM & $EST: $SIM $EST MaxEval PostHoc CL F1*AMT/CL AUCtrapezoid VarETACL YES YES 0 NO 0.147 1.68 1.68 0 YES YES 0 YES 0.373 0.659 1.68 0.932 So now I have my plot of the mean concentrations for this dose and route (from PRED column), I will remember to check the FO/FOCE toggle in $EST, and I apologize for bothering everyone with problems arising from my late-night coding error. Paul -- 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