This example illustrates the use of MDLINFOIN= and MDLINFOOUT= data sets. Using the data set shown, PROC X12 step identifies the model with outliers as displayed in Output 38.7.1. Output 38.7.2 shows the data set that represents the chosen model.
data b1; input y @@; datalines; 112 118 132 129 121 135 148 148 136 119 104 118 115 126 141 135 125 149 270 170 158 133 114 140 ;
title 'Model Identification Output to MDLINFOOUT= Data Set'; proc x12 data=b1 start='1980q1' interval=qtr MdlInfoOut=mdl; automdl; outlier; run ;
proc print data=mdl; run;
Output 38.7.1: Displayed Model Identification with Outliers
Model Identification Output to MDLINFOOUT= Data Set |
Critical Values to use in Outlier Detection |
|
---|---|
For Variable y | |
Begin | 1980Q1 |
End | 1985Q4 |
Observations | 24 |
Method | Add One |
AO Critical Value | 3.419415 |
LS Critical Value | 3.419415 |
Final Automatic Model Selection | ||||||
---|---|---|---|---|---|---|
For Variable y | ||||||
Source of Model | Estimated Model | |||||
Automatic Model Choice | ( 2, | 1, | 0) | ( 0, | 0, | 0) |
Regression Model Parameter Estimates | ||||||
---|---|---|---|---|---|---|
For Variable y | ||||||
Type | Parameter | NoEst | Estimate | Standard Error | t Value | Pr > |t| |
Automatically Identified | AO 1984Q3 | Est | 102.36589 | 5.96584 | 17.16 | <.0001 |
Exact ARMA Maximum Likelihood Estimation | |||||
---|---|---|---|---|---|
For Variable y | |||||
Parameter | Lag | Estimate | Standard Error | t Value | Pr > |t| |
Nonseasonal AR | 1 | 0.40892 | 0.20213 | 2.02 | 0.0554 |
2 | -0.53710 | 0.20975 | -2.56 | 0.0178 |
Output 38.7.2: PROC X12 MDLINFOOUT= Data Set Model with Outlier Detection
Model Identification Output to MDLINFOOUT= Data Set |
Obs | _NAME_ | _MODELTYPE_ | _MODELPART_ | _COMPONENT_ | _PARMTYPE_ | _DSVAR_ | _VALUE_ | _FACTOR_ | _LAG_ | _SHIFT_ | _NOEST_ | _EST_ | _STDERR_ | _TVALUE_ | _PVALUE_ | _STATUS_ | _SCORE_ | _LABEL_ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | y | REG | EVENT | SCALE | AO | AO01JUL1984D | . | . | . | . | 0 | 102.366 | 5.96584 | 17.1587 | 0.000000 | . | ||
2 | y | ARIMA | FORECAST | NONSEASONAL | DIF | y | . | . | 1 | . | . | . | . | . | . | . | ||
3 | y | ARIMA | FORECAST | NONSEASONAL | AR | y | . | 1 | 1 | . | 0 | 0.409 | 0.20213 | 2.0231 | 0.055385 | . | ||
4 | y | ARIMA | FORECAST | NONSEASONAL | AR | y | . | 1 | 2 | . | 0 | -0.537 | 0.20975 | -2.5606 | 0.017830 | . |
Suppose that after examining the output from the preceding example, you decide that an Easter regressor should be added to the model. The following statements create a data set with the model identified above and adds a U.S. Census Bureau Predefined Easter(25) regressor. The new model data set to be used as input in the MDLINFOIN= option is displayed in the data set shown in Output 38.7.3.
data pluseaster; _NAME_ = 'y'; _MODELTYPE_ = 'REG'; _MODELPART_ = 'PREDEFINED'; _COMPONENT_ = 'SCALE'; _PARMTYPE_ = 'EASTER'; _DSVAR_ = 'EASTER'; _VALUE_ = 25; run; data mdlpluseaster; set mdl; run; proc append base=mdlpluseaster data=pluseaster force; run;
proc print data=mdlpluseaster; run;
Output 38.7.3: MDLINFOIN= Data Set Model with Easter(25) Regression Added
Model Identification Output to MDLINFOOUT= Data Set |
Obs | _NAME_ | _MODELTYPE_ | _MODELPART_ | _COMPONENT_ | _PARMTYPE_ | _DSVAR_ | _VALUE_ | _FACTOR_ | _LAG_ | _SHIFT_ | _NOEST_ | _EST_ | _STDERR_ | _TVALUE_ | _PVALUE_ | _STATUS_ | _SCORE_ | _LABEL_ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | y | REG | EVENT | SCALE | AO | AO01JUL1984D | . | . | . | . | 0 | 102.366 | 5.96584 | 17.1587 | 0.000000 | . | ||
2 | y | ARIMA | FORECAST | NONSEASONAL | DIF | y | . | . | 1 | . | . | . | . | . | . | . | ||
3 | y | ARIMA | FORECAST | NONSEASONAL | AR | y | . | 1 | 1 | . | 0 | 0.409 | 0.20213 | 2.0231 | 0.055385 | . | ||
4 | y | ARIMA | FORECAST | NONSEASONAL | AR | y | . | 1 | 2 | . | 0 | -0.537 | 0.20975 | -2.5606 | 0.017830 | . | ||
5 | y | REG | PREDEFINED | SCALE | EASTER | EASTER | 25 | . | . | . | . | . | . | . | . | . |
The following statements estimate the regression and ARIMA parameters by using the model described in the new data set mdlpluseaster
. The results of estimating the new model are shown in Output 38.7.4.
proc x12 data=b1 start='1980q1' interval=qtr MdlInfoIn=mdlpluseaster MdlInfoOut=mdl2; estimate; run;
Output 38.7.4: Estimate Model with Added Easter(25) Regression
Model Identification Output to MDLINFOOUT= Data Set |
Regression Model Parameter Estimates | ||||||
---|---|---|---|---|---|---|
For Variable y | ||||||
Type | Parameter | NoEst | Estimate | Standard Error | t Value | Pr > |t| |
Easter | Easter[25] | Est | 6.15738 | 4.89162 | 1.26 | 0.2219 |
User Defined | AO01JUL1984D | Est | 105.29433 | 6.15636 | 17.10 | <.0001 |
Exact ARMA Maximum Likelihood Estimation | |||||
---|---|---|---|---|---|
For Variable y | |||||
Parameter | Lag | Estimate | Standard Error | t Value | Pr > |t| |
Nonseasonal AR | 1 | 0.44376 | 0.20739 | 2.14 | 0.0443 |
2 | -0.54050 | 0.21656 | -2.50 | 0.0210 |
The new model estimation results are displayed in the data set mdl2
shown in Output 38.7.5.
proc print data=mdl2; run;
Output 38.7.5: MDLINFOOUT= Data Set, Estimation of Model with Easter(25) Regression Added
Model Identification Output to MDLINFOOUT= Data Set |
Obs | _NAME_ | _MODELTYPE_ | _MODELPART_ | _COMPONENT_ | _PARMTYPE_ | _DSVAR_ | _VALUE_ | _FACTOR_ | _LAG_ | _SHIFT_ | _NOEST_ | _EST_ | _STDERR_ | _TVALUE_ | _PVALUE_ | _STATUS_ | _SCORE_ | _LABEL_ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | y | REG | PREDEFINED | SCALE | EASTER | EASTER | 25 | . | . | . | 0 | 6.157 | 4.89162 | 1.2588 | 0.22193 | . | ||
2 | y | REG | EVENT | SCALE | AO | AO01JUL1984D | . | . | . | . | 0 | 105.294 | 6.15636 | 17.1033 | 0.00000 | . | ||
3 | y | ARIMA | FORECAST | NONSEASONAL | DIF | y | . | . | 1 | . | . | . | . | . | . | . | ||
4 | y | ARIMA | FORECAST | NONSEASONAL | AR | y | . | 1 | 1 | . | 0 | 0.444 | 0.20739 | 2.1397 | 0.04428 | . | ||
5 | y | ARIMA | FORECAST | NONSEASONAL | AR | y | . | 1 | 2 | . | 0 | -0.541 | 0.21656 | -2.4959 | 0.02096 | . |