Power Function Model
Alison adds ...
Most likely the only records with the prediction F =0 are the infusion
dose event records. By default, the $ERROR block is evaluated (i.e.,
the ERROR subroutine is called) with every event record. It is
possible to prevent the $ERROR block from being evaluated with
non-observation events. Include:
$ERROR
CALLFL=0
.. etc...
Only if the F=0 records are unavoidable *must* one of your two coding
solutions be used. (Unavoidable situations include models having ALAG
and observations that fall prior to the lagged dose time, or when some
individuals have observations so far out in time that compartment
amounts have underflowed to 0.)
---------------
I would add that I don't really like the power function model
not only because it gets us into trouble at zero, but because
it is unrealistic *near* zero. There is always a lower limit of
detection. I have found that if (i) one uses the additive plus
proportional error model, (ii) sets values less than the lower limit
as equal to that lower limit, and (iii) sets the SD of the
additive part of the error equal to the lower limit, then
everything behaves just about right. Thus, in the following code,
just fix theta(5)=lower detection limit.
$ERROR
W = THETA(5)*EPS(1) + THETA(6)*F*EPS(2)
Y=F+W
IPRED=F
IRES=DV-IPRED
IWRES=IRES/W
$SIGMA 1 FIX 1 FIX