Thorsten,
I was surprised to see that Steve's suggestion to change the ENDO statement into a PARMS statement does allow PROC MODEL to estimate this one compartment model; however, I would not recommend this approach as it exploits an unintended side effect in PROC MODEL and may not work in the future.
The more standard way of estimating this model would be to include the unobserved values, a1 and a2, in the data set:
data step02;
set step01;
a1 = .;
a2 = .;
run;
proc model data=step02;
endo a1 400 a2 0;
...
I would also like to point out that neither of these approaches may be exactly what you want. Presumably, in your model the dose is administered at time = 0. In your code the STEP01 data set's first observation is at time=0.1. That means when PROC MODEL integrates these ODEs it uses a1=400, and a2=0 as the initial conditions at time=0.1. To set the initial conditions a1=400, and a2=0 at time=0 you should add an extra observation with time=0 and conc=0 to the top of your data set.
Regarding adding a pulse, or bolus, dose to the first equation you could use code like the following:
dert.A1 = -ka * A1 + dose*dirac(time - tbolus);
after first defining a dirac function using PRC FCMP:
proc fcmp outlib=work.funcs.f;
function dirac(args[*]) varargs;
x = args[1];
if dim (args) = 1 then
delta = 1e-6;
else
delta = args[2];
if abs(x) < delta then
f = (delta - abs(x))/(delta*delta);
else
f = 0;
return (f);
endsub;
run;
options cmplib=funcs;
You would need to define the TBOLUS, and DOSE variables either in your data set, or your model program.
Marc
... View more