BookmarkSubscribeRSS Feed
hvganesh
Calcite | Level 5
Hi,
Could anyone please help me code the following model in SAS? In essence, I am trying to incorporate autoregressive error in an ordinary differential equation.

x_dot_t = (N - x_t) * (theta1 + theta2 * x_t) + e_t

e_t = rho * e_t-1 + u_t

The code without the autoregressive error is:

proc model data=test;
params theta1 theta2 N;
dert.x = (N-x)*(theta1+theta2*x);
fit x/time=t dw;
run;

I have tried the following and none of them works:

1. %ar(dert.x,1),
2. dert.x = (N-x)*(theta1+theta2*x) + zlag1(dert.x-(N-x)*(theta1+theta2*x));

Thanks in advance for your help.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 1094 views
  • 0 likes
  • 1 in conversation