The X13 Procedure

Example 45.11 AUXDATA= Data Set

This example demonstrates the use of the AUXDATA= data set to input user-defined regressors for use in the regARIMA model. User-defined regressors are often economic indicators, but in this example a user-defined regressor is generated in the following statements:

data auxreg(keep=date lengthofmonth);
   set sales;
   lengthofmonth = (INTNX('MONTH',date,1) - date) - (365/12);
   format date monyy.;
run;

When you use the AUXDATA= data set, it is not necessary to merge the user-defined regressor data set with the DATA= data set. The following statements input the regressor lengthofmonth in the data set auxreg. The regressor lengthofmonth is specified in the REGRESSION statement, and the data set auxreg is specified in the AUXDATA= option in the PROC X13 statement.

title 'Align lengthofmonth Regressor from Auxreg to First Three Years';
ods select regParameterEstimates;
proc x13 data=sales(obs=36) date=date auxdata=auxreg;
   var sales;
   regression uservar=lengthofmonth;
   arima model=((0 1 1) (0 1 1));
   estimate;
run;
title 'Align lengthofmonth Regressor from Auxreg to Second Three Years';
ods select regParameterEstimates;
proc x13 data=sales(firstobs=37 obs=72) date=date auxdata=auxreg;
   var sales;
   regression uservar=lengthofmonth;
   arima model=((0 1 1) (0 1 1));
   estimate;
run;

Output 45.11.1 and Output 45.11.2 display the parameter estimates for the two series.

Output 45.11.1: Using Regressors in the AUXDATA= Data for the First Three Years of Series

Align lengthofmonth Regressor from Auxreg to First Three Years

The X13 Procedure

Regression Model Parameter Estimates
For Variable sales
Type Parameter NoEst Estimate Standard
Error
t Value Pr > |t|
User Defined lengthofmonth Est 2.98046 5.36251 0.56 0.5840



Output 45.11.2: Using Regressors in the AUXDATA= Data for the Second Three Years of Series

Align lengthofmonth Regressor from Auxreg to Second Three Years

The X13 Procedure

Regression Model Parameter Estimates
For Variable sales
Type Parameter NoEst Estimate Standard
Error
t Value Pr > |t|
User Defined lengthofmonth Est -0.51215 8.43145 -0.06 0.9521



The X13 procedure uses the date variable in the sales data set and the auxreg data set to align the user-defined regressors.

In the following example, the DATA= data set salesby contains BY groups. The X13 procedure aligns the regressor in the auxreg data set to each BY group in the salesby data set according to the variable date that is specified by the DATE= option in the PROC X13 statement. The variable date must be present in the auxreg data set to align the values.

data salesby;
     set sales(obs=72);
     if ( _n_ < 37 ) then by=1;
     else by=2;
run;
ods select regParameterEstimates;
title 'Align lengthofmonth Regressor from Auxreg to BY Groups';
proc x13 data=salesby date=date auxdata=auxreg;
   var sales;
   by by;
   regression uservar=lengthofmonth;
   arima model=((0 1 1) (0 1 1));
   estimate;
run;

The results in Output 45.11.3 match the previous results in Output 45.11.1 and Output 45.11.2.

Output 45.11.3: Using Regressors in the AUXDATA= Data with BY Groups

Align lengthofmonth Regressor from Auxreg to BY Groups

The X13 Procedure

Regression Model Parameter Estimates
For Variable sales
Type Parameter NoEst Estimate Standard
Error
t Value Pr > |t|
User Defined lengthofmonth Est 2.98046 5.36251 0.56 0.5840

Align lengthofmonth Regressor from Auxreg to BY Groups

The X13 Procedure

Regression Model Parameter Estimates
For Variable sales
Type Parameter NoEst Estimate Standard
Error
t Value Pr > |t|
User Defined lengthofmonth Est -0.51215 8.43145 -0.06 0.9521