<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PROC MODEL: Estimating ODE parameters in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MODEL-Estimating-ODE-parameters/m-p/64199#M3049</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am a SAS beginner, so please excuse me if my question is silly.&lt;BR /&gt;
&lt;BR /&gt;
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:&lt;BR /&gt;
&lt;BR /&gt;
dxi/dt = f(param1, param2, param3, param3, input1, input2, input3, input4, x1, x2, x3, x4)&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
If I manually choose the parameter values, I am able to successfully simulate the model using something like this&lt;BR /&gt;
&lt;BR /&gt;
PROC MODEL &lt;BR /&gt;
... &lt;BR /&gt;
SOLVE x1 x2 x3 x4 / time = ...; &lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
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." &lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
My code is:&lt;BR /&gt;
&lt;BR /&gt;
PROC MODEL&lt;BR /&gt;
	&lt;BR /&gt;
	DATA=... /* the data includes, time, input and actual values of x */&lt;BR /&gt;
	OUT=...&lt;BR /&gt;
	OUTALL;&lt;BR /&gt;
&lt;BR /&gt;
	parameters param1=... param2=... ...;&lt;BR /&gt;
&lt;BR /&gt;
	dependent x1=... x2=... ... ;&lt;BR /&gt;
&lt;BR /&gt;
	DERT.x1 = ...&lt;BR /&gt;
	...&lt;BR /&gt;
	DERT.x4 = ...&lt;BR /&gt;
&lt;BR /&gt;
	fit x1 x2 x3 x4 / time=... dynamic SUR;&lt;BR /&gt;
RUN; &lt;BR /&gt;
&lt;BR /&gt;
Can anyone tell me what I'm doing wrong?&lt;BR /&gt;
&lt;BR /&gt;
Thank you!</description>
    <pubDate>Wed, 03 Mar 2010 16:53:59 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-03-03T16:53:59Z</dc:date>
    <item>
      <title>PROC MODEL: Estimating ODE parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MODEL-Estimating-ODE-parameters/m-p/64199#M3049</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am a SAS beginner, so please excuse me if my question is silly.&lt;BR /&gt;
&lt;BR /&gt;
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:&lt;BR /&gt;
&lt;BR /&gt;
dxi/dt = f(param1, param2, param3, param3, input1, input2, input3, input4, x1, x2, x3, x4)&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
If I manually choose the parameter values, I am able to successfully simulate the model using something like this&lt;BR /&gt;
&lt;BR /&gt;
PROC MODEL &lt;BR /&gt;
... &lt;BR /&gt;
SOLVE x1 x2 x3 x4 / time = ...; &lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
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." &lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
My code is:&lt;BR /&gt;
&lt;BR /&gt;
PROC MODEL&lt;BR /&gt;
	&lt;BR /&gt;
	DATA=... /* the data includes, time, input and actual values of x */&lt;BR /&gt;
	OUT=...&lt;BR /&gt;
	OUTALL;&lt;BR /&gt;
&lt;BR /&gt;
	parameters param1=... param2=... ...;&lt;BR /&gt;
&lt;BR /&gt;
	dependent x1=... x2=... ... ;&lt;BR /&gt;
&lt;BR /&gt;
	DERT.x1 = ...&lt;BR /&gt;
	...&lt;BR /&gt;
	DERT.x4 = ...&lt;BR /&gt;
&lt;BR /&gt;
	fit x1 x2 x3 x4 / time=... dynamic SUR;&lt;BR /&gt;
RUN; &lt;BR /&gt;
&lt;BR /&gt;
Can anyone tell me what I'm doing wrong?&lt;BR /&gt;
&lt;BR /&gt;
Thank you!</description>
      <pubDate>Wed, 03 Mar 2010 16:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MODEL-Estimating-ODE-parameters/m-p/64199#M3049</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-03T16:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MODEL: Estimating ODE parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MODEL-Estimating-ODE-parameters/m-p/64200#M3050</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
As a side note...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
When I do not include the input vectors, i.e., when I assign constant values to the variables&lt;BR /&gt;
&lt;BR /&gt;
input1 = const1;&lt;BR /&gt;
input2 = const2;&lt;BR /&gt;
&lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
I would very much appreciate if anyone had even just a vague idea of what might be the problem...</description>
      <pubDate>Thu, 04 Mar 2010 09:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MODEL-Estimating-ODE-parameters/m-p/64200#M3050</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-04T09:37:15Z</dc:date>
    </item>
  </channel>
</rss>

