The X13 Procedure

Example 46.3 Seasonal Adjustment

(View the complete code for this example.)

Assuming that the model in Example 46.2 is satisfactory, a seasonal adjustment that uses forecast extension can be performed by adding the X11 statement to the procedure. By default, the data are forecast one year ahead at the end of the series.

ods output D8A#1=SalesD8A_1;
ods output D8A#2=SalesD8A_2;
ods output D8A#3=SalesD8A_3;
ods output D8A#4=SalesD8A_4;
proc x13 data=sales date=date;
   var sales;
   transform power=0;
   arima model=( (0,1,1)(0,1,1) );
   estimate;
   x11;
run;
title 'Stable Seasonality Test';
proc print data=SalesD8A_1 LABEL;
run;
title 'Nonparametric Stable Seasonality Test';
proc print data=SalesD8A_2 LABEL;
run;
title 'Moving Seasonality Test';
proc print data=SalesD8A_3 LABEL;
run;
title 'Combined Seasonality Test';
proc print data=SalesD8A_4 LABEL NOOBS;
   var _NAME_ Name1 Label1 cValue1;
run;

Table D8A, which contains the seasonality tests, is shown in Output 46.3.1.

Output 46.3.1: Table D8A as Displayed

The X13 Procedure


Table D 8.A: F-tests for Seasonality
For Variable sales

Test for the Presence of Seasonality Assuming Stability
 Sum of SquaresDFMean SquareF-Value 
Between Months23571.41112142.855190.9544**
Residual1481.2813211.22182  
Total25052.69143   

** Seasonality present at the 0.1 percent level.


Nonparametric Test for the
Presence of Seasonality Assuming
Stability
Kruskal-Wallis
Statistic
DFProbability
Level
131.954611.00%

Seasonality present at the one percent level.


Moving Seasonality Test
 Sum of SquaresDFMean SquareF-Value 
Between Years259.25171025.925173.370317**
Error846.14241107.692204  

**Moving seasonality present at the one percent level.


Summary of Results and Combined Test for the Presence of Identifiable Seasonality
Seasonality Tests:Probability Level
  
Stable Seasonality F-test0.000
Moving Seasonality F-test0.001
Kruskal-Wallis Chi-square Test0.000
  
Combined Measures:Value
  
T1 = 7/F_Stable0.04
T2 = 3*F_Moving/F_Stable0.05
T = (T1 + T2)/20.04
  
Combined Test of Identifiable Seasonality:Present


The four ODS statements in the preceding example direct output from the D8A tables into four data sets: SalesD8A_1, SalesD8A_2, SalesD8A_3, and SalesD8A_4. It is best to direct the output to four different data sets because the four tables associated with Table D8A have varying formats. The ODS data sets are shown in Output 46.3.2, Output 46.3.3, Output 46.3.4, and Output 46.3.5.

Output 46.3.2: Table D8A Output in Data Set SalesD8A_1

Stable Seasonality Test

Obs_NAME_FT_SRCSum of SquaresDFMean SquareF-ValueFT_AST
1salesBetween Months23571.41112142.855190.9544**
2salesResidual1481.2813211.22182. 
3salesTotal25052.69143.. 


Output 46.3.3: Table D8A Output in Data Set SalesD8A_2

Nonparametric Stable Seasonality Test

Obs_NAME_Kruskal-Wallis
Statistic
DFProbability
Level
1sales131.954611.00%


Output 46.3.4: Table D8A Output in Data Set SalesD8A_3

Moving Seasonality Test

Obs_NAME_FT_SRCSum of SquaresDFMean SquareF-ValueFT_AST
1salesBetween Years259.25171025.925173.370317**
2salesError846.14241107.692204. 


Output 46.3.5: Table D8A Output in Data Set SalesD8A_4

Combined Seasonality Test

_NAME_Name1Label1cValue1
sales Seasonality Tests:Probability Level
sales   
salesP_STABLEStable Seasonality F-test0.000
salesP_MOVMoving Seasonality F-test0.001
salesP_KWKruskal-Wallis Chi-square Test0.000
sales   
sales Combined Measures:Value
sales   
salesT1T1 = 7/F_Stable0.04
salesT2T2 = 3*F_Moving/F_Stable0.05
salesTT = (T1 + T2)/20.04
sales   
salesIDSeasTestCombined Test of Identifiable Seasonality:Present


Last updated: August 11, 2020