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-2024.png

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.

 

Register now!

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.

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