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

PROC X13 TRAMO/SEATS trend extraction from trend-cycle

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

PROC X13 TRAMO/SEATS trend extraction from trend-cycle

Hello SAS Community, 

 

I am using the TRAMO/SEATS component of the SAS ETS X13 procedure to attempt to extract the long term trend from a time series. However, SAS combines the trend and cycle together in the output. In getting the trend-cycle, both the trend and cycle would have to be extracted through SEATS but these separate series are not provided in the output. Is there an undocumented option to get this output, or some way to access the working sets prior to the output to grab these series?

 

It's my first time posting so forgive me if I forget standards, I'm happy to answer any follow up questions if it helps you answer my question.

 

If it helps, here is my code so far:

proc x13 data=data date=date interval=qtr  ;
	var series;
	transform function=auto; 
	automdl maxdiff=(1,1) maxorder=(4,1);
	outlier;
	seatsdecomp out=output;
run;

Thanks,

 

Sean


Accepted Solutions
Solution
‎09-13-2016 07:04 PM
SAS Employee
Posts: 10

Re: PROC X13 TRAMO/SEATS trend extraction from trend-cycle

Sean,

 

Here are my thoughts about your question:

  • The SEATS method implemented in X13 is experimental. The warning written to the log reads as follows:

 

WARNING: This is an experimental release of the SEATSDECOMP statement. It has not had the same

         level of testing as other components of the SAS system.

 

Validating code is the most difficult part of the software development process. Often there is little or no software validation done for software that is freely available. The SEATS method in X13 has not yet been validated to our usual standards.

 

  • The version of SEATS used in the SAS method does not seem to make the cycle component available to the user; it is a version prior to the 2014 version that is referenced in the paper:

 

http://www.bde.es/f/webbde/SES/servicio/Programas_estadisticos_y_econometricos/Programas/ficheros/TS...

 

The documentation for the version of SEATS that was used to produce the SEATSDECOMP statement is:

 

Gómez, V., and Maravall, A. (1997b). Programs TRAMO and SEATS: Instructions for the User, Beta Version. Madrid: Banco de España.

 

In this document, there are numerous references to splitting the trend and cycle component into different series. However, in examining the printed output from the program, I only see references to a TREND-CYCLE series. In addition, in the SEATS documentation, there are references to output files cycle.t and cyclefac.t. Looking at the files produced by numerous runs of the SEATS FORTRAN program, I only see one file cycle.t, and it is associated with a run that caused a core dump – the program failed to run to completion.  This appears to be a situation where the documentation did not accurately describe the features of the software.  The fact that the trend cycle was not available in the older version seems to be confirmed by the 2014 article.

 

  • For the initial implementation of the method in SAS, the most basic output was selected to be output, and that consists of the series for the Original, Seasonal, Trend-Cycle, Seasonally Adjusted, and Irregular components. These are the series output at the end of the program and are described as the basic output by the documentation. Outputting the Trend-Cycle series is also consistent with X13 Table D12, which is the trend-cycle component. Also, the main purpose of the X13 software is to obtain a seasonally adjusted series.

 

  • Since the X-13ARIMA-SEATS program of the U.S. Census Bureau allows the Trend and Cycle to be decomposed separately by specifying HPCYCLE, this could be considered for a future release of the X13 procedure.

 

  • If you have a specific need for decomposing the series into separate trend and cycle components, then there are several methods available in SAS that use the Hodrick-Prescott filter:
    • The DECOMP statement in the TIMESERIES procedure.
    • The TRANSFORMIN= and TRANSFORMOUT= options HP_C and HP_T in the EXPAND procedure. 

 

 

Both the EXPAND and TIMESERIES procedure should provide reliable, high quality output. Also, it is easy to output series from one SAS procedure and input the series into another procedure. So, for instance, the B1 series from X13 could be used as input for the TIMESERIES procedure, or the TREND-CYCLE component could be used as input to the EXPAND procedure.

 

 

 

  • It is also possible to execute FORTRAN code from SAS, if you would prefer to do that. However, FORTRAN will compute on undefined values. For example, the calculations do not stop when a divide by zero occurs or a floating point overflow. Thus, inaccurate calculations in FORTRAN are often hidden from the user.

Thank you for supplying your data. We will add the data to our test validation code for the X13 procedure. If you have any further questions, please let me know.

 

View solution in original post


All Replies
SAS Employee
Posts: 10

Re: PROC X13 TRAMO/SEATS trend extraction from trend-cycle

Hi Sean,

 

I am looking in to this. It would be helpful to have your data.

Thanks.

New Contributor
Posts: 4

Re: PROC X13 TRAMO/SEATS trend extraction from trend-cycle

Hey Tammy,

 

I've been using the Australian Bureau of Statistic's employment by industry release, specifically for Agriculture, Forestry and Fishing and its child series Agriculture. I've attached my data set of the two quarterly raw series.

 

I also found this update notes to TRAMO/SEATS that talks about the decomposition of the trend-cycle into its business cycle and long-term trend components. Maybe this feature is not yet available in the SAS X-13 package.

 

Sean

Solution
‎09-13-2016 07:04 PM
SAS Employee
Posts: 10

Re: PROC X13 TRAMO/SEATS trend extraction from trend-cycle

Sean,

 

Here are my thoughts about your question:

  • The SEATS method implemented in X13 is experimental. The warning written to the log reads as follows:

 

WARNING: This is an experimental release of the SEATSDECOMP statement. It has not had the same

         level of testing as other components of the SAS system.

 

Validating code is the most difficult part of the software development process. Often there is little or no software validation done for software that is freely available. The SEATS method in X13 has not yet been validated to our usual standards.

 

  • The version of SEATS used in the SAS method does not seem to make the cycle component available to the user; it is a version prior to the 2014 version that is referenced in the paper:

 

http://www.bde.es/f/webbde/SES/servicio/Programas_estadisticos_y_econometricos/Programas/ficheros/TS...

 

The documentation for the version of SEATS that was used to produce the SEATSDECOMP statement is:

 

Gómez, V., and Maravall, A. (1997b). Programs TRAMO and SEATS: Instructions for the User, Beta Version. Madrid: Banco de España.

 

In this document, there are numerous references to splitting the trend and cycle component into different series. However, in examining the printed output from the program, I only see references to a TREND-CYCLE series. In addition, in the SEATS documentation, there are references to output files cycle.t and cyclefac.t. Looking at the files produced by numerous runs of the SEATS FORTRAN program, I only see one file cycle.t, and it is associated with a run that caused a core dump – the program failed to run to completion.  This appears to be a situation where the documentation did not accurately describe the features of the software.  The fact that the trend cycle was not available in the older version seems to be confirmed by the 2014 article.

 

  • For the initial implementation of the method in SAS, the most basic output was selected to be output, and that consists of the series for the Original, Seasonal, Trend-Cycle, Seasonally Adjusted, and Irregular components. These are the series output at the end of the program and are described as the basic output by the documentation. Outputting the Trend-Cycle series is also consistent with X13 Table D12, which is the trend-cycle component. Also, the main purpose of the X13 software is to obtain a seasonally adjusted series.

 

  • Since the X-13ARIMA-SEATS program of the U.S. Census Bureau allows the Trend and Cycle to be decomposed separately by specifying HPCYCLE, this could be considered for a future release of the X13 procedure.

 

  • If you have a specific need for decomposing the series into separate trend and cycle components, then there are several methods available in SAS that use the Hodrick-Prescott filter:
    • The DECOMP statement in the TIMESERIES procedure.
    • The TRANSFORMIN= and TRANSFORMOUT= options HP_C and HP_T in the EXPAND procedure. 

 

 

Both the EXPAND and TIMESERIES procedure should provide reliable, high quality output. Also, it is easy to output series from one SAS procedure and input the series into another procedure. So, for instance, the B1 series from X13 could be used as input for the TIMESERIES procedure, or the TREND-CYCLE component could be used as input to the EXPAND procedure.

 

 

 

  • It is also possible to execute FORTRAN code from SAS, if you would prefer to do that. However, FORTRAN will compute on undefined values. For example, the calculations do not stop when a divide by zero occurs or a floating point overflow. Thus, inaccurate calculations in FORTRAN are often hidden from the user.

Thank you for supplying your data. We will add the data to our test validation code for the X13 procedure. If you have any further questions, please let me know.

 

New Contributor
Posts: 4

Re: PROC X13 TRAMO/SEATS trend extraction from trend-cycle

Thanks Tammy, I couldn't have hoped for a better response! I'll try those alternatives.
☑ This topic is SOLVED.

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

Discussion stats
  • 4 replies
  • 578 views
  • 2 likes
  • 2 in conversation