MATLAB Examples

Specify Innovation Distribution

regARIMA stores the distribution (and degrees of freedom for the t distribution) in the Distribution property. The data type of Distribution is a struct array with potentially two fields: Name and DoF.

  • If the innovations are Gaussian, then the Name field is Gaussian, and there is no DoF field. regARIMA sets Distribution to Gaussian by default.
  • If the innovations are t-distributed, then the Name field is t and the DoF field is NaN by default, or you can specify a scalar that is greater than 2.

To illustrate specifying the distribution, consider this regression model with AR(2) errors:

$$\begin{array}{rcl}y_t &=& c+X_t\beta+u_t \\
u_t &=& \alpha_1 u_{t-1}+\alpha_2 u_{t-2}+\varepsilon_t\end{array}$$

Mdl = regARIMA(2,0,0);
Mdl.Distribution
ans = 

  struct with fields:

    Name: "Gaussian"

By default, Distribution property of Mdl is a struct array with the field Name having the value Gaussian.

If you want to specify a t innovation distribution, then you can either specify the model using the name-value pair argument 'Distribution','t', or use dot notation to modify an existing model.

Specify the model using the name-value pair argument.

Mdl = regARIMA('ARLags',1:2,'Distribution','t');
Mdl.Distribution
ans = 

  struct with fields:

    Name: "t"
     DoF: NaN

If you use the name-value pair argument to specify the t innovation distribution, then the default degrees of freedom is NaN.

You can use dot notation to yield the same result.

Mdl = regARIMA(2,0,0);
Mdl.Distribution = 't'
Mdl = 

  regARIMA with properties:

     Description: "ARMA(2,0) Error Model (t Distribution)"
    Distribution: Name = "t", DoF = NaN
       Intercept: NaN
            Beta: [1×0]
               P: 2
               Q: 0
              AR: {NaN NaN} at lags [1 2]
             SAR: {}
              MA: {}
             SMA: {}
        Variance: NaN

If the innovation distribution is $t_{10}$, then you can use dot notation to modify the Distribution property of the existing model Mdl. You cannot modify the fields of Distribution using dot notation, e.g., Mdl.Distribution.DoF = 10 is not a value assignment. However, you can display the value of the fields using dot notation.

Mdl.Distribution = struct('Name','t','DoF',10)
tDistributionDoF = Mdl.Distribution.DoF
Mdl = 

  regARIMA with properties:

     Description: "ARMA(2,0) Error Model (t Distribution)"
    Distribution: Name = "t", DoF = 10
       Intercept: NaN
            Beta: [1×0]
               P: 2
               Q: 0
              AR: {NaN NaN} at lags [1 2]
             SAR: {}
              MA: {}
             SMA: {}
        Variance: NaN

tDistributionDoF =

    10

Since the DoF field is not a NaN, it is an equality constraint when you estimate Mdl using estimate.

Alternatively, you can specify the $t_{10}$ innovation distribution using the name-value pair argument.

Mdl = regARIMA('ARLags',1:2,'Intercept',0,...
    'Distribution',struct('Name','t','DoF',10))
Mdl = 

  regARIMA with properties:

     Description: "ARMA(2,0) Error Model (t Distribution)"
    Distribution: Name = "t", DoF = 10
       Intercept: 0
            Beta: [1×0]
               P: 2
               Q: 0
              AR: {NaN NaN} at lags [1 2]
             SAR: {}
              MA: {}
             SMA: {}
        Variance: NaN