Modeling Rates and Effects of Drug X
And another comment on the "Drug affects X" problem: If X is endogenous,
then it is already at steady-state prior to an intervention (indeed, one
usually measures a "base-line" value), and starting the data off
with a time zero infusion actually starts the system from zero, not
steady-state. If the first observation is sufficiently long after
time zero, the system will get to steady-state and there should be
no problem. If you have a base-line measurement, you will want
to start the sytem off at seady-state, which you can do using,e.g.,
$INPUT ID TIME AMT RATE ONDR X=DV SS
$SUBR ADVAN1
$PK
KK = THETA(1) ; OFF-DRUG TV ELIM RATE
IF(ONDR.EQ.1) KK = THETA(2) ; ON-DRUG TV ELIM RATE
K = KK*(1+ETA(1)) ; ON-DRUG INDIVIDUAL ELIM RATE
RR = THETA(3) ; OFF-DRUG TV INPUT RATE
IF(ONDR.EQ.1) RR = THETA(4) ; ON-DRUG TV INPUT RATE
R1 = RR*(1+ETA(2)) ; ON-DRUG INDIVIDUAL INPUT RATE
etc.
with data file
#ID TIME AMT RATE ONDR X=DV SS
1 0 0 -1 0 . 1
1 0 9999 -1 0 . .
etc.