BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
EconStudent
Calcite | Level 5

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;

1 ACCEPTED SOLUTION

Accepted Solutions
rselukar
SAS Employee

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

2 REPLIES 2
rselukar
SAS Employee

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.

EconStudent
Calcite | Level 5

I get it.

 

Thanks for you help.

 

Andrew

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

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