problem with simulation

3 messages 2 people Latest: Nov 30, 2004

problem with simulation

From: Kai wu Date: November 30, 2004 technical
From: "kai wu" Subject: [NMusers] problem with simulation Date: Tue, November 30, 2004 11:52 am Dear users, I am doing a pk-pd simulation with indirect response model to see the inhibition in two PD compartment. I set up three occasions, for two different doses and baseline respectively. PK follow 2-comp, and the inhibiton will be quantified as AUC in 24 hrs. After simulation I found there is something wrong with the simulated concentrations in the second PD compartment. The baseline AUC is actually much lower than the AUC after dosing, and the starting steady concentration(at 24hr) at baseline is much lower than the other two dosing occations. The model used in this simulation was also tried by "SCIENTIST" for single subject and the results were right as supposed. So I am hoping someone can point out where I am doing wrong in this NONMEM simulation. The basic code is as followings: $PROBLEM PKPD $INPUT ID TIME AMT DV CMT EVID OCC $DATA ALL1.CSV IGNORE=# $SUBROUTINES ADVAN6 TRANS1 TOL=5 $MODEL COMP=(! DEPOT) ;1 COMP=(CENTRAL) ;2 COMP=(PERIPH) ;3 COMP=(CORT);4 COM=(LYM);5 $ABBREVIATED DERIV2=NO $PK ... RRBE=935 RRBC=7.8 IF (OCC.EQ.3) RRBC=935 ... $DES DADT(1)=-KA*A(1) DADT(2)=KA*A(1)-K10*A(2) CP=A(2)/S2 EFFC=1-CP*0.12/(EC50+CP*0.12) DADT(3)=RCORT*EFFC-KE*A(3) Cort=A(3)/S3 KTC=30000000 KALB=5000 QTC=0.0000007 QALB=0.00055 MW=362.47*(10**6) CortM=Cort/MW B1=KTC*QTC+KALB*QALB+1-CortM*KTC A1=KALB*QALB*KTC+KTC CORTFM=(-B1+SQRT(B1**2+4*A1*CortM))/(2*A1) Cortf=CORTFM*MW UPP=CP*0.12+Cortf*RRBC/RRBE DOW=EC50CL+CP*0.12+Cortf*RRBC/RRBE EFFL=1-UPP/DOW DADT(4)=KIN*EFFL-KOUT*A(4) ... $SIGMA (0 FIXED) (0 FIXED) (0 FIXED) ... And the data file is basically set up as #ID TIME AMT DV CMT EVID OCC 1 0 0 4 0 1 1 0 0 5 0 1 1 24 1000 1 1 1 1 24 0 2 0 1 1 24 0 4 0 1 1 24 0 5 0 1 Thanks in advance! Kai Wu Department of Pharmaceutics University of Florida Gainesville, Fl Office phone #: 352-846-2730

RE: problem with simulation

From: Nick Holford Date: November 30, 2004 technical
From: "Nick Holford" Subject: RE: [NMusers] problem with simulation Date: Tue, November 30, 2004 2:27 pm Kai Wu, I am not really sure what differences you find between NONMEM and Scientist simulations but it looks like the initial conditions are incorrect. This could explain why the AUCs in this CMT are low. In the fragment of data you give there is no AMT for CMT 4 and 5 at time zero so it seems you are assuming that the initial state of these compartments is zero. That is unlikely for a physiological turnover model. So I suggest you add two records for each subject at time zero. An AMT of 1 is put in each compartment to initialize it e.g. #ID TIME AMT DV CMT EVID OCC 1 0 1 . 4 1 1 ; initialize CMT 4 1 0 1 . 5 1 1 ; initialize CMT 5 1 0 0 . 4 0 1 ; Observation for CMT 4 1 0 0 . 5 0 1 ; Observation for CMT 5 Then in $PK you should use the bioavailability fraction trick to get the correct initial value in these compartments. You don't give the DADT for the second PD compartment 5 so I am guessing it is a simple turnover model. F4 = KIN/KOUT ; Compartment 4 initial value F5 = KIN5/KOUT5 ; Compartment 5 initial value The amount in these compartments at time zero is then calculated from the AMT (with a nominal value of 1) at time 0 times the bioavailability fraction (the desired initial value). When using this model for simulation the run times are probably not very long but if you use if for estimation you may be able to shorten run times by writing more efficient code. All the code in $DES is computed many times in order to solve the differential equations. It is therefore a good idea to keep all unnecessary calculations out of this block e.g. I would write this in $PK and remove these constant assignments out of $DES. IF (NEWIND.LE.1) THEN ; this is only executed once per subject KTC=30000000 KALB=5000 QTC=0.0000007 QALB=0.00055 MW=362.47*(10**6) ENDIF You could also compute DCP=CP*0.12 just once in $DES and use this value instead of multiplying CP*0.12 in several different places in the $DES code. Nick -- Nick Holford, Dept Pharmacology & Clinical Pharmacology University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand email:n.holford@auckland.ac.nz tel:+64(9)373-7599x86730 fax:373-7556 http://www.health.auckland.ac.nz/pharmacology/staff/nholford/

RE: problem with simulation

From: Kai wu Date: November 30, 2004 technical
From: "kai wu" Subject: RE: [NMusers] problem with simulation Date: Tue, November 30, 2004 3:31 pm Sorry, I mistakenly post part of the code for a one-comp. PK. For the $DES block, it should be: $DES DADT(1)=-KA*A(1) DADT(2)=KA*A(1)+K21*A(3)-K12*A(2)-K10*A(2) DADT(3)=K12*A(2)-K21*A(3) CP=A(2)/S2 EFFC=1-CP*0.1/(EC50+CP*0.1) DADT(4)=RCORT*EFFC-KE*A(4) Cort=A(4)/S4 KTC=30000000 KALB=5000 QTC=0.0000007 QALB=0.00055 MW=362.47*(10**6) CortM=Cort/MW B1=KTC*QTC+KALB*QALB+1-CortM*KTC A1=KALB*QALB*KTC+KTC CORTFM=(-B1+SQRT(B1**2+4*A1*CortM))/(2*A1) Cortf=CORTFM*MW UPP=CP*0.1+Cortf*RRBC/RRBE DOW=EC50CL+CP*0.1+Cortf*RRBC/RRBE EFFL=1-UPP/DOW DADT(5)=KIN*EFFL-KOUT*A(5) To initialize the PD compartment, I tried two methods, one is similar to Nick suggested, I set up like: #ID TIME AMT DV CMT EVID OCC 1 0 115 4 1 1 1 0 100 5 1 1 1 0 0 115 4 0 1 1 0 0 100 5 0 1 The other method is to start actual dosing at time 24 instead of time 0, which give 24 hours for system to achieve sd st. Both method simulate the same concentrations. _______________________________________________________