turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- How do I retrieve UCM residuals?

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-05-2016 03:54 AM

Hi,

I am trying to find out how to retrieve the time series of estimated residuals (or innovations) of the components of an unobserved components model, using the SAS UCM procedure.

I CAN retrieve the residuals for the irregular component of the measurement equation.

The other components, such as level, slope, cycle and autoreg components, are also estimated with error.

I can retrieve the estimates of the components OK, but I can't see how to retrieve the full time series of the residuals for each component.

Is it possible to do so? Perhaps they are not identified?

I'm using SAS 9.4. See code snippet below.

Andrew

proc ucm data=LFData printall;

id date interval= quarter;

model u;

irregular;

level;

slope;

cycle;

estimate plots=panel;

run;

Accepted Solutions

Solution

06-11-2016
07:36 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to EconStudent

06-06-2016 11:23 AM

You can get the residuals by using the FORECAST statement as follows:

forecast outfor=out;

The "residual" column in the "out" data set contains the residuals (see the details about OUTFOR= data set at http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_ucm_details38....).

By the way, I am not sure what you mean by the "residuals" for various components. It is true that the defining equations for different components do have "disturbance" terms. The estimates of these disturbance terms are NOT output anywhere in the UCM procedure. On the other hand, you do get the estimates of these components (e.g., level, slope, cycle, season, irregular, etc.) themselves, and the variance parameters of these disturbance terms. Please go over the UCM doc carefully as well as have some good book (see the reference section of the doc) handy.

All Replies

Solution

06-11-2016
07:36 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to EconStudent

06-06-2016 11:23 AM

You can get the residuals by using the FORECAST statement as follows:

forecast outfor=out;

The "residual" column in the "out" data set contains the residuals (see the details about OUTFOR= data set at http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_ucm_details38....).

By the way, I am not sure what you mean by the "residuals" for various components. It is true that the defining equations for different components do have "disturbance" terms. The estimates of these disturbance terms are NOT output anywhere in the UCM procedure. On the other hand, you do get the estimates of these components (e.g., level, slope, cycle, season, irregular, etc.) themselves, and the variance parameters of these disturbance terms. Please go over the UCM doc carefully as well as have some good book (see the reference section of the doc) handy.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to rselukar

06-06-2016 11:13 PM

I get it.

Thanks for you help.

Andrew