MATLAB Examples

AR Error Model with Nonconsecutive Lags

This example shows how to specify a regression model with AR errors, where the nonzero AR terms are at nonconsecutive lags.

Specify the regression model with AR(4) errors:

$$\begin{array}{l}{y_t} = c + {X_t}\beta  + {u_t}\\{u_t} = {a_1}{u_{t - 1}} + {a_4}{u_{t - 4}} + {\varepsilon _t}.\end{array}$$

Mdl = regARIMA('ARLags',[1,4])
Mdl = 

    ARIMA(4,0,0) Error Model:
    --------------------------
    Distribution: Name = 'Gaussian'
       Intercept: NaN
               P: 4
               D: 0
               Q: 0
              AR: {NaN NaN} at Lags [1 4]
             SAR: {}
              MA: {}
             SMA: {}
        Variance: NaN

The AR coefficients are at lags 1 and 4.

Verify that the AR coefficients at lags 2 and 3 are 0.

Mdl.AR
ans =

  1x4 cell array

    {[NaN]}    {[0]}    {[0]}    {[NaN]}

The software displays a 1-by-4 cell array. Each consecutive cell contains the corresponding AR coefficient value.

Pass Mdl and data into estimate. The software estimates all parameters that have the value NaN. Then, estimate holds $a_2$ = 0 and $a_3$ = 0 during estimation.