Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- PROC SSM Estimation of Time-varying parameters for Time-series forecas...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 10-12-2018 12:16 PM
(851 views)

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

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

1 REPLY 1

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

**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.

Multiple Linear Regression in SAS

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.