| The HPFARIMASPEC Procedure |
In the case of many seasonal model specifications, it is possible to describe a generic specification that is applicable in a variety of situations just by changing the season length specifications at appropriate places. As an example, consider the Airline model, which is very useful for modeling seasonal data. The Airline model for a monthly series can be specified using the following syntax:
proc hpfarimaspec repository=work.specs
name=MonthlyAirline
label="Airline Model For A Series With Season Length 12";
forecast symbol=Y q=(1)(1)12 dif=(1, 12) noint
transform= log;
run;
It is easy to see that the same syntax is applicable to a quarterly series if the multiplier in the MA specification is changed from 12 to 4 and the seasonal differencing order is similarly changed from 12 to 4. A generic specification that allows for late binding of season lengths can be generated by the following syntax:
proc hpfarimaspec repository=work.specs
name=GenericAirline
label="Generic Airline Model";
forecast symbol=Y q=(1)(1)s dif=(1, s) noint
transform= log;
run;
In this syntax the multiplier in the MA specification is changed from 12 to "s", and similarly the seasonal differencing order 12 is changed to "s". This syntax creates a template for the Airline model that is applicable to different season lengths. When the HPFENGINE procedure, which actually uses such model specifications to estimate the model and produce the forecasts, encounters such "generic" specification it automatically creates a proper specification by replacing the placeholders for the seasonal multiplier and the seasonal differencing order with the value implied by the ID variable or its SEASONALITY= option. The following example illustrates the use of this generic spec. It shows how the same spec can be used for monthly and quarterly series. The parameter estimates for monthly and quarterly series are given in Output 3.3.1 and Output 3.3.2, respectively.
/* Create a selection list that contains
the Generic Airline Model */
proc hpfselect repository=work.specs
name=genselect;
spec GenericAirline;
run;
/* Monthly interval */
proc hpfengine data=sashelp.air
repository=work.specs
globalselection=genselect
print=(estimates);
id date interval=month;
forecast air;
run;
| Parameter Estimates for GENERICAIRLINE Model | |||||
|---|---|---|---|---|---|
| Component | Parameter | Estimate | Standard Error | t Value | Approx Pr > |t| |
| AIR | MA1_1 | 0.37727 | 0.08196 | 4.60 | <.0001 |
| AIR | MA2_12 | 0.57236 | 0.07802 | 7.34 | <.0001 |
/* Create a quarterly series to illustrate
accumulating the monthly Airline series to quarterly*/
proc timeseries data=sashelp.air out=Qair;
id date interval=quarter;
var air / accumulate=total;
run;
/* Quarterly interval */
proc hpfengine data=Qair
repository= work.specs
globalselection=genselect
print=(estimates);
id date interval=quarter;
forecast air;
run;
| Parameter Estimates for GENERICAIRLINE Model | |||||
|---|---|---|---|---|---|
| Component | Parameter | Estimate | Standard Error | t Value | Approx Pr > |t| |
| AIR | MA1_1 | 0.05892 | 0.15594 | 0.38 | 0.7075 |
| AIR | MA2_4 | 0.50558 | 0.14004 | 3.61 | 0.0008 |
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.