Forecasting using SAS Forecast Server, SAS/ETS, and more

How do I retrieve UCM residuals?

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

How do I retrieve UCM residuals?

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
SAS Employee
Posts: 49

Re: How do I retrieve UCM residuals?

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.

View solution in original post


All Replies
Solution
‎06-11-2016 07:36 PM
SAS Employee
Posts: 49

Re: How do I retrieve UCM residuals?

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.

New Contributor
Posts: 2

Re: How do I retrieve UCM residuals?

I get it.

 

Thanks for you help.

 

Andrew

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 256 views
  • 0 likes
  • 2 in conversation