From:"Agoram, Balaji" 
Subject: [NMusers] Adaptive trial simulations using NONMEM
Date: Mon, 7 Apr 2003 19:01:17 -0700

All
I am trying to run an adaptive trial simulation using NONMEM and I am not
sure how to proceed. 
Specifically, I am simulating my PD marker which starts at a baseline H0 and
decreases according to a first order equation, and when it reaches a
threshold Ht, I would like to start dosing my drug at a certain frequency.
The marker is measured every two weeks and I would like to explore dosing
frequencies of qW, q2W, and q4W. It is possible that in some cases H0<Ht in
which case I would like to start dosing at the start itself.
Any idea on how to organize my control stream and input data stream would be
tremendously helpful.
Regards

Balaji Agoram, Ph.D.
PKDM, Amgen, Inc. 
MS30E-0-A
Thousand Oaks, CA 91320
_______________________________________________________

From: "Ekaterina Gibiansky" 
Subject: Re: [NMusers] Adaptive trial simulations using NONMEM
Date:Tue, 08 Apr 2003 12:02:50 -0400

Balaji,
 
one way, probably not the most efficient though, is to do simulation in steps. Run your
simulation with dummy line for dosing once a week first, having for example EVID=2 on
those lines to get predictions at that times. From the simulated marker, figure out when
dosing should start for each patient. Create the second data file where AMT are not all
zeros any more, but correspond to the doses you want to give. Run simulation again using
the SAME seed you had in the first run. That way the generated sequence of random values
 will be the same, so you'll get the same etas and epsilons as in the first run.
 
Katya
 

Ekaterina Gibiansky, PhD
Head, Pharmacometrics & Principal Scientist
Guilford Pharmaceuticals Inc
Phone: (410)-631-6828
Fax:   (410)-631-6828
E-mail: gibianskye@guilfordpharm.com
_______________________________________________________

From: 
Subject:Re: [NMusers] Adaptive trial simulations using NONMEM
Date:Tue, 8 Apr 2003 14:01:33 -0400

We have done some of this by giving a dose of 1.0 (in the data set) at any time you might give
a dose for any dosing regimen, then adjusting the dose (including setting dose = 0) by change
F programmatically. e.g.,
PD is pharmacodynamic endpoint. 
if (PD.LE.10) THEN 
  F1 = 500 
ELSE 
  F1 = 0 
ENDIF 

could use values other than 500 to get other doses. 

For your case, you may need to put some indicator variables in the data set to say whether this
is week 1 or 2 for the every other week, e.g., 

#  ID TIME AMT DV WEEK) 
1       0         1     .        0 
1    168        1     .        1 
1    336        1     .        2 
1    504        1     .        3       
Then 
IF (PD.LE.10.AND.(WEEK.EQ.0.OR.WEEK.EQ.2)) THEN 
  F1 = 500 
ELSE 
  F1 = 0 
ENDIF

  

Mark
_______________________________________________________