Hi – I want to run a time-series linear regression model with time-varying betas using the SSM approach (see attached for equations). The dependent variable is stationary (through differencing). I looked into SAS PROC SSM but I am not clear of the right syntax to use. Given the expertise in this community, I thought you may have a quick answer to my question. I would greatly appreciate your help. I am using SAS v 9.4 on Windows 10.
Regards, -Pappe
You can easily do this in SSM. However you must lag your C variables prior to using them in the SSM procedure (in a DATA step). Even though SSM procedure permits DATA step statements, the LAG and DIF operations are not permitted. Suppose X = Lag( C ) and there are three X variables X1 X2 X3 (so beta is three dimensional). Then you can use the following syntax:
Proc ssm data=test;
State beta(3) type=rw cov(g); /* this assumes epsilon_t is three dimensional noise with full covariance */
Comp regEffect = (X1 X2 X3)*beta;
Irregular eta;
Model y = regEffect eta;
Run;
I have shown syntax for univariate Y. Your Y can be multivariate. You will need to read the SSM syntax and DOC examples for these more involved cases. For univariate Y you can also use the RANDOMREG statement in PROC UCM, which might be even easier.
See SSM and UCM procedure docs at http://support.sas.com/documentation/onlinedoc/ets/indexproc.html#ets143
You can easily do this in SSM. However you must lag your C variables prior to using them in the SSM procedure (in a DATA step). Even though SSM procedure permits DATA step statements, the LAG and DIF operations are not permitted. Suppose X = Lag( C ) and there are three X variables X1 X2 X3 (so beta is three dimensional). Then you can use the following syntax:
Proc ssm data=test;
State beta(3) type=rw cov(g); /* this assumes epsilon_t is three dimensional noise with full covariance */
Comp regEffect = (X1 X2 X3)*beta;
Irregular eta;
Model y = regEffect eta;
Run;
I have shown syntax for univariate Y. Your Y can be multivariate. You will need to read the SSM syntax and DOC examples for these more involved cases. For univariate Y you can also use the RANDOMREG statement in PROC UCM, which might be even easier.
See SSM and UCM procedure docs at http://support.sas.com/documentation/onlinedoc/ets/indexproc.html#ets143
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.