Programming the statistical procedures from SAS

PROC MODEL: Estimating ODE parameters

Posts: 0

PROC MODEL: Estimating ODE parameters


I am a SAS beginner, so please excuse me if my question is silly.

I'm trying to estimate the parameters of a ODE system with four equations and eight parameters. Each of the 4 ODEs look something like this:

dxi/dt = f(param1, param2, param3, param3, input1, input2, input3, input4, x1, x2, x3, x4)

I have a data set that includes the values of the input variables and the dependent variables (x1, x2, etc.) at each discrete time point (t=1, ... 60). Thus, the data is a table that has 8 columns and 60 rows.

If I manually choose the parameter values, I am able to successfully simulate the model using something like this

SOLVE x1 x2 x3 x4 / time = ...;

However, when I try to estimate the parameters, I get an error: "At OLS Iteration 0 there are 1 nonmissing observations available. At least 3 are needed to compute the next iteration."

I also get a warning: "Missing value encountered for initial DERT.x1 at ..." In my data, the input variables are not known at each time but I get the same warning even when I fill the missing values with some arbitrary numbers.

My code is:


DATA=... /* the data includes, time, input and actual values of x */

parameters param1=... param2=... ...;

dependent x1=... x2=... ... ;

DERT.x1 = ...
DERT.x4 = ...

fit x1 x2 x3 x4 / time=... dynamic SUR;

Can anyone tell me what I'm doing wrong?

Thank you!
Posts: 0

Re: PROC MODEL: Estimating ODE parameters

Posted in reply to deleted_user

As a side note...

When I do not include the input vectors, i.e., when I assign constant values to the variables

input1 = const1;
input2 = const2;


The code works - well almost. I get the warning "The covariance across equations (the S matrix) is singular. A generalized inverse was computed by setting to zero the part of the S matrix for the following 1 equations whose residuals are linearly dependent with residuals from earlier equations: x2" I suppose this does not come as a surprise, given that the ODEs make little sense if the input is constant.

So maybe the problem is with how I deal with the input variables? I just refer to them in the code using the same variable name with which they appear in the data.

I would very much appreciate if anyone had even just a vague idea of what might be the problem...
Ask a Question
Discussion stats
  • 1 reply
  • 1 in conversation