The VARMAX Procedure

Seasonal Dummies and Time Trends

You can use the NSEASON= option to introduce seasonal dummies into the model, and the TREND= option to introduce linear trend or both linear and quadratic trends into the model. The definition of the seasonal dummies and trends starts from the first observation after skipping the presample and the observations that have missing values. The size of the presample is $\max {(p,s)}$, where p is the maximum number of lags of AR terms and s is the maximum number of lags of exogenous variables; that is, the presample contains $\{ \mb{y}_{-l+1}, \mb{x}_{-l+1}, \ldots , \mb{y}_0, \mb{x}_0\} $, where $l=max(p,s)$.

The following statements fit a bivariate VARX(1, 2) model that has four seasonal periods and both linear and quadratic time trends:

data One;
   format date date9.;
   do obs = 1 to 100;
      date=intnx('quarter','01Jan1990'd,obs-1);
      y1 = normal(1); y2 = normal(1); x = normal(1);
      output;
   end;
run;

proc varmax data=One;
   model y1 y2 = x / nseason=4 xlag=2 p=1 trend=quad;
run;

In the following statements, the seasonal dummies and time trends are explicitly defined in the data set, together with the lags of dependent and exogenous variables, and then the equivalent model is fit by the REG procedure in SAS/STAT software:

data Two;
   set one;
   y1lag1 = lag(y1); y2lag1 = lag(y2);
   xlag1 = lag(x); xlag2 = lag2(x);
   if (obs>2) then do;
      ltrend = obs - 2;
      qtrend = ltrend * ltrend;
      const = 1;
      if (mod(ltrend-2,4)=0) then sd1 = 1;
      else sd1 = 0;
      if (mod(ltrend-3,4)=0) then sd2 = 1;
      else sd2 = 0;
      if (mod(ltrend-4,4)=0) then sd3 = 1;
      else sd3 = 0;
   end;
run;

proc reg data=Two(firstobs=3);
   model y1 = const sd1 sd2 sd3 ltrend qtrend
              x xlag1 xlag2 y1lag1 y2lag1 / noint;
   model y2 = const sd1 sd2 sd3 ltrend qtrend
              x xlag1 xlag2 y1lag1 y2lag1 / noint;
run;

The first 11 observations in data set Two are output in FigureĀ 42.61 to show what the seasonal dummies and linear and quadratic time trends look like.

proc print data=Two(obs=11);
   var date const sd1 sd2 sd3 ltrend qtrend;
run;

Figure 42.61: The First 11 Observations in Data Set Two

Obs date const sd1 sd2 sd3 ltrend qtrend
1 01JAN1990 . . . . . .
2 01APR1990 . . . . . .
3 01JUL1990 1 0 0 0 1 1
4 01OCT1990 1 1 0 0 2 4
5 01JAN1991 1 0 1 0 3 9
6 01APR1991 1 0 0 1 4 16
7 01JUL1991 1 0 0 0 5 25
8 01OCT1991 1 1 0 0 6 36
9 01JAN1992 1 0 1 0 7 49
10 01APR1992 1 0 0 1 8 64
11 01JUL1992 1 0 0 0 9 81