X13 Procedure

Example 45.4 RegARIMA Automatic Model Selection

(View the complete code for this example.)

This example demonstrates regARIMA modeling and TRAMO-based automatic model selection, which is available with the AUTOMDL statement. ODS SELECT statements are used to limit the displayed output to the model selection and estimation stages. The same data set is used as in the previous examples.

title 'TRAMO Automatic Model Identification';
ods select UnitRootTestModel
           UnitRootTest
           AutoChoiceModel
           Best5Model
           AutomaticModelChoice
           InitialModelChoice
           FinalModelChecks
           FinalModelChoice
           AutomdlNote;
proc x13 data=sales date=date;
   var sales;
   transform function=log;
   regression predefined=td;
   automdl maxorder=(1,1)
           print=all;
   estimate;
   x11;
   output out=out a1 a2 a6 b1 c17 c20 d1 d7 d8 d9 d10
                  d11 d12 d13 d16 d18;
run;
proc print data=out(obs=21);
   title 'Output Variables Related to Trading Day Regression';
run;

The automatic model selection output is shown in Output 45.4.1, Output 45.4.2, and Output 45.4.3. The first table, "ARIMA Estimate for Unit Root Identification" in Output 45.4.1, gives details of the method that TRAMO uses to automatically select the orders of differencing. The second table, "Results of Unit Root Test for Identifying Orders of Differencing" in Output 45.4.1, shows that a regular difference order of 1 and a seasonal difference order of 1 has been determined by TRAMO. The third table, "Models Estimated by Automatic ARIMA Model Selection Procedure" in Output 45.4.2, shows all the models examined by the TRAMO-based method. The fourth table, "Best Five ARIMA Models Chosen by Automatic Modeling" in Output 45.4.3, shows the top five models in order of rank and their BIC2 statistic. The fifth table, "Comparison of Automatically Selected Model and Default Model" in Output 45.4.3, compares the model selected by the TRAMO model to the default regARIMA model of the X-13ARIMA-SEATS method. The sixth table, "Initial Automatic Model Selection" in Output 45.4.3, shows which model was selected between the two models that are compared in the table "Comparison of Automatically Selected Model and Default Model." (When available, the table "Check of the Residual Ljung-Box Q Statistic" in Output 45.4.3 contains additional information about the initial model choice.) The seventh table, "Final Checks for Identified Model" in Output 45.4.3, displays the results of the final model checks for model adequacy. The eighth table, "Final Automatic Model Selection" in Output 45.4.3, shows which model was actually selected.

Output 45.4.1: Output from the AUTOMDL Statement

TRAMO Automatic Model Identification

The X13 Procedure

ARIMA Estimates for Unit Root Identification
For Variable sales
Model Number Estimation Method   ARMA 
Estimated ModelParameter Estimate 
1 H-R ( 2,0,0)( 1,0,0) NS_AR_1 0.67540  
  H-R ( 2,0,0)( 1,0,0) NS_AR_2 0.28425  
  H-R ( 2,0,0)( 1,0,0) S_AR_12 0.91963  
2 H-R ( 1,1,1)( 1,0,1) NS_AR_1 0.13418  
  H-R ( 1,1,1)( 1,0,1) S_AR_12 0.98500  
  H-R ( 1,1,1)( 1,0,1) NS_MA_1 0.47884  
  H-R ( 1,1,1)( 1,0,1) S_MA_12 0.51726  
3 H-R ( 1,1,1)( 1,1,1) NS_AR_1 -0.39269  
  H-R ( 1,1,1)( 1,1,1) S_AR_12 0.06223  
  H-R ( 1,1,1)( 1,1,1) NS_MA_1 -0.09570  
  H-R ( 1,1,1)( 1,1,1) S_MA_12 0.58536  

Results of Unit Root Test
for Identifying Orders
of Differencing
For Variable sales
Regular difference
order
Seasonal
difference
order
Mean Significant
11no


Output 45.4.2: Output from the AUTOMDL Statement

Models estimated by Automatic ARIMA Model Selection procedure
For Variable sales
Model Number  ARMA Statistics of Fit
 Estimated ModelParameter EstimateBIC BIC2
1  ( 3,1,0)( 0,1,0) NS_AR_1 -0.33524    
   ( 3,1,0)( 0,1,0) NS_AR_2 -0.05558    
   ( 3,1,0)( 0,1,0) NS_AR_3 -0.15649    
   ( 3,1,0)( 0,1,0)     1024.469 -3.40549
2  ( 3,1,0)( 0,1,1) NS_AR_1 -0.33186    
   ( 3,1,0)( 0,1,1) NS_AR_2 -0.05823    
   ( 3,1,0)( 0,1,1) NS_AR_3 -0.15200    
   ( 3,1,0)( 0,1,1) S_MA_12 0.55279    
   ( 3,1,0)( 0,1,1)     993.7880 -3.63970
3  ( 3,1,0)( 1,1,0) NS_AR_1 -0.38673    
   ( 3,1,0)( 1,1,0) NS_AR_2 -0.08768    
   ( 3,1,0)( 1,1,0) NS_AR_3 -0.18143    
   ( 3,1,0)( 1,1,0) S_AR_12 -0.47336    
   ( 3,1,0)( 1,1,0)     1000.224 -3.59057
4  ( 3,1,0)( 1,1,1) NS_AR_1 -0.34352    
   ( 3,1,0)( 1,1,1) NS_AR_2 -0.06504    
   ( 3,1,0)( 1,1,1) NS_AR_3 -0.15728    
   ( 3,1,0)( 1,1,1) S_AR_12 -0.12163    
   ( 3,1,0)( 1,1,1) S_MA_12 0.47073    
   ( 3,1,0)( 1,1,1)     998.0548 -3.60713
5  ( 0,1,0)( 0,1,1) S_MA_12 0.60446    
   ( 0,1,0)( 0,1,1)     996.8560 -3.61628
6  ( 0,1,1)( 0,1,1) NS_MA_1 0.36272    
   ( 0,1,1)( 0,1,1) S_MA_12 0.55599    
   ( 0,1,1)( 0,1,1)     986.6405 -3.69426
7  ( 1,1,0)( 0,1,1) NS_AR_1 -0.32734    
   ( 1,1,0)( 0,1,1) S_MA_12 0.55834    
   ( 1,1,0)( 0,1,1)     987.1500 -3.69037
8  ( 1,1,1)( 0,1,1) NS_AR_1 0.17833    
   ( 1,1,1)( 0,1,1) NS_MA_1 0.52867    
   ( 1,1,1)( 0,1,1) S_MA_12 0.56212    
   ( 1,1,1)( 0,1,1)     991.2363 -3.65918
9  ( 0,1,1)( 0,1,0) NS_MA_1 0.36005    
   ( 0,1,1)( 0,1,0)     1017.770 -3.45663


Output 45.4.3: Output from the AUTOMDL Statement

Best Five ARIMA Models Chosen by Automatic
Modeling
For Variable sales
Rank Estimated Model BIC2
1 ( 0,1,1)( 0,1,1) -3.69426
2 ( 1,1,0)( 0,1,1) -3.69037
3 ( 1,1,1)( 0,1,1) -3.65918
4 ( 0,1,0)( 0,1,1) -3.61628
5 ( 0,1,1)( 0,1,0) -3.45663

Comparison of Automatically Selected Model and Default Model
For Variable sales
Source of Candidate Models   Statistics of Fit
Estimated ModelConfidence Coefficient
of the Ljung-Box
Q Statistic
 Residual Standard
Error
 Number of
Outliers
Automatic Model Choice ( 0,1,1)( 0,1,1) 0.62561 0.03546 0
Airline Model (Default) ( 0,1,1)( 0,1,1) 0.62561 0.03546 0

Initial Automatic Model Selection
For Variable sales
Source of ModelEstimated Model
Automatic Model Choice( 0,1,1)( 0,1,1)

Final Checks for Identified Model
For Variable sales
TestResultModel Change
Check for Unit RootsNo unit root.No Change
Check for Nonseasonal OverdifferencingNonseasonal MA not within 0.001 of 1.0 - model passes.No Change
Check for insignificant ARMA coefficientsNo insignificant ARMA coefficients found.No Change

Final Automatic Model Selection
For Variable sales
Source of ModelOrders AlteredEstimated Model
Automatic Model ChoiceNo( 0,1,1)( 0,1,1)


Table 17 and Output 45.4.4 illustrate the regARIMA modeling method. Table 17 shows the relationship between the output variables in PROC X13 that results from a regARIMA model. Note that some of these formulas apply only to this example. Output 45.4.4 shows the values of these variables for the first 21 observations in the example.

Table 17: regARIMA Output Variables and Descriptions

Table Title Type Formula
A1 Time series data (for the span analyzed) Data Input
A2 Prior-adjustment factors leap year (from trading day regression) adjustments Factor Calculated from regression
A6 RegARIMA trading day component leap year prior adjustments included from Table A2 Factor Calculated from regression
B1 Original series (prior adjusted) Data upper B 1 equals upper A 1 slash upper A 6*
(adjusted for regARIMA factors) *Because only TD specified
C17 Final weights for irregular component Factor Calculated using moving standard deviation
C20 Final extreme value adjustment factors Factor Calculated using C16 and C17
D1 Modified original data, D iteration Data upper D 1 equals upper B 1 slash upper C 20**
upper D 1 equals upper C 19 slash upper C 20
**upper C 19 equals upper B 1 in this example
D7 Preliminary trend cycle, D iteration Data Calculated using Henderson
moving average
D8 Final unmodified SI ratios Factor upper D 8 equals upper B 1 slash upper D 7***
upper D 8 equals upper C 19 slash upper D 7
***TD specified in regression
D9 Final replacement values for SI ratios Factor If C17 shows extreme values,
upper D 9 equals upper D 1 slash upper D 7;
upper D 9 equals period otherwise
D10 Final seasonal factors Factor Calculated using moving averages
D11 Final seasonally adjusted data Data upper D 11 equals upper B 1 slash upper D 10****
(also adjusted for trading day) upper D 11 equals upper C 19 slash upper D 10
****upper B 1 equals upper C 19 for this example
D12 Final trend cycle Data Calculated using Henderson moving average
D13 Final irregular component Factor upper D 13 equals upper D 11 slash upper D 12
D16 Combined adjustment factors (includes seasonal, trading day factors) Factor upper D 16 equals upper A 1 slash upper D 11
D18 Combined calendar adjustment factors Factor upper D 18 equals upper D 16 slash upper D 10
(includes trading day factors) upper D 18 equals upper A 6*****
*****Regression TD is the only calendar adjustment factor in this example


Output 45.4.4: Output Variables Related to Trading Day Regression

Output Variables Related to Trading Day Regression

ObsDATEsales_A1sales_A2sales_A6sales_B1sales_C17sales_C20sales_D1sales_D7sales_D8sales_D9sales_D10sales_D11sales_D12sales_D13sales_D16sales_D18
1SEP781121.000001.01328110.5321.000001.00000110.532124.1380.89040.0.90264122.453124.4480.983980.914631.01328
2OCT781181.000000.99727118.3231.000001.00000118.323124.9050.94731.0.94328125.438125.1151.002580.940700.99727
3NOV781321.000000.98960133.3881.000001.00000133.388125.6461.06161.1.06320125.459125.7230.997901.052140.98960
4DEC781291.000001.00957127.7771.000001.00000127.777126.2311.01225.0.99534128.375126.2051.017201.004871.00957
5JAN791211.000000.99408121.7211.000001.00000121.721126.5570.96179.0.97312125.083126.4790.988960.967350.99408
6FEB791350.991150.99115136.2051.000001.00000136.205126.6781.07521.1.05931128.579126.5871.015741.049940.99115
7MAR791481.000001.00966146.5841.000001.00000146.584126.8251.15580.1.17842124.391126.7230.981601.189801.00966
8APR791481.000000.99279149.0751.000001.00000149.075127.0381.17347.1.18283126.033126.9020.993151.174300.99279
9MAY791361.000000.99406136.8131.000001.00000136.813127.4331.07360.1.06125128.916127.2571.013031.054950.99406
10JUN791191.000001.01328117.4401.000001.00000117.440127.9000.91822.0.91663128.121127.7471.002930.928811.01328
11JUL791041.000000.99727104.2851.000001.00000104.285128.4990.81156.0.81329128.226128.4210.998480.811070.99727
12AUG791181.000000.99678118.3811.000001.00000118.381129.2530.91589.0.91135129.897129.3161.004490.908410.99678
13SEP791151.000001.00229114.7370.986300.99964114.778130.1600.881510.881820.90514126.761130.3470.972490.907221.00229
14OCT791261.000000.99408126.7510.880921.00320126.346131.2380.965810.962730.93820135.100131.5071.027320.932640.99408
15NOV791411.000001.00366140.4861.000001.00000140.486132.6991.05869.1.06183132.306132.9370.995251.065711.00366
16DEC791351.000000.99872135.1731.000001.00000135.173134.5951.00429.0.99339136.072134.7201.010040.992120.99872
17JAN801251.000000.99406125.7470.000000.95084132.248136.8200.919060.966580.97481128.996136.7630.943210.969020.99406
18FEB801491.026551.03400144.1001.000001.00000144.100139.2151.03509.1.06153135.748138.9960.976631.097621.03400
19MAR801701.000000.99872170.2171.000001.00000170.217141.5591.20245.1.17965144.295141.2211.021771.178140.99872
20APR801701.000000.99763170.4041.000001.00000170.404143.7771.18520.1.18499143.802143.3971.002831.182180.99763
21MAY801581.000001.00966156.4891.000001.00000156.489145.9251.07239.1.06005147.624145.5911.013971.070281.00966


Last updated: June 19, 2025