Main Content

If you create a regression model with ARIMA errors using `regARIMA`

, then the software assigns values to all of its properties. To change any of these property values, you do not need to reconstruct the entire model. You can modify property values of an existing model using dot notation. To access the property, type the model name, then the property name, separated by '|.|' (a period).

Specify the regression model with ARIMA(3,1,2) errors

$$\begin{array}{rcl}{y}_{t}& =& c+{u}_{t}\\ \left(1-{\varphi}_{1}L-{\varphi}_{2}{L}^{2}-{\varphi}_{3}{L}^{3}\right){\left(1-L\right)}^{D}{u}_{t}& =& \left(1+{\theta}_{1}L+{\theta}_{2}{L}^{2}\right){\epsilon}_{t}.\end{array}$$

Mdl = regARIMA(3,1,2);

Use cell array notation to set the autoregressive and moving average parameters to values.

Mdl.AR = {0.2 0.1 0.05}; Mdl.MA = {0.1 -0.05}

Mdl = regARIMA with properties: Description: "ARIMA(3,1,2) Error Model (Gaussian Distribution)" Distribution: Name = "Gaussian" Intercept: NaN Beta: [1×0] P: 4 D: 1 Q: 2 AR: {0.2 0.1 0.05} at lags [1 2 3] SAR: {} MA: {0.1 -0.05} at lags [1 2] SMA: {} Variance: NaN

Use dot notation to display the autoregressive coefficients of `Mdl`

in the Command Window.

ARCoeff = Mdl.AR

`ARCoeff=`*1×3 cell array*
{[0.2000]} {[0.1000]} {[0.0500]}

`ARCoeff`

is a 1-by-3 cell array. Each, successive cell contains the next autoregressive lags.

You can also add more lag coefficients.

Mdl.MA = {0.1 -0.05 0.01}

Mdl = regARIMA with properties: Description: "ARIMA(3,1,3) Error Model (Gaussian Distribution)" Distribution: Name = "Gaussian" Intercept: NaN Beta: [1×0] P: 4 D: 1 Q: 3 AR: {0.2 0.1 0.05} at lags [1 2 3] SAR: {} MA: {0.1 -0.05 0.01} at lags [1 2 3] SMA: {} Variance: NaN

By default, the specification sets the new coefficient to the next, consecutive lag. The addition of the new coefficient increases `Q`

by 1.

You can specify a lag coefficient to a specific lag term by using cell indexing.

Mdl.AR{12} = 0.01

Mdl = regARIMA with properties: Description: "ARIMA(12,1,3) Error Model (Gaussian Distribution)" Distribution: Name = "Gaussian" Intercept: NaN Beta: [1×0] P: 13 D: 1 Q: 3 AR: {0.2 0.1 0.05 0.01} at lags [1 2 3 12] SAR: {} MA: {0.1 -0.05 0.01} at lags [1 2 3] SMA: {} Variance: NaN

The autoregressive coefficient `0.01`

is located at the 12th lag. Property `P`

increases to 13 with the new specification.

Set the innovation distribution to the *t* distribution with `NaN`

degrees of freedom.

Distribution = struct('Name','t','DoF',NaN); Mdl.Distribution = Distribution

Mdl = regARIMA with properties: Description: "ARIMA(12,1,3) Error Model (t Distribution)" Distribution: Name = "t", DoF = NaN Intercept: NaN Beta: [1×0] P: 13 D: 1 Q: 3 AR: {0.2 0.1 0.05 0.01} at lags [1 2 3 12] SAR: {} MA: {0.1 -0.05 0.01} at lags [1 2 3] SMA: {} Variance: NaN

If `DoF`

is `NaN`

, then `estimate`

estimates the degrees of freedom. For other tasks, such as simulating or forecasting a model, you must specify a value for `DoF`

.

To specify a regression coefficient, assign a vector to the property `Beta`

.

Mdl.Beta = [1; 3; -5]

Mdl = regARIMA with properties: Description: "Regression with ARIMA(12,1,3) Error Model (t Distribution)" Distribution: Name = "t", DoF = NaN Intercept: NaN Beta: [1 3 -5] P: 13 D: 1 Q: 3 AR: {0.2 0.1 0.05 0.01} at lags [1 2 3 12] SAR: {} MA: {0.1 -0.05 0.01} at lags [1 2 3] SMA: {} Variance: NaN

If you pass `Mdl`

into `estimate`

with the response data and three predictor series, then the software fixes the non-|NaN| parameters at their values, and estimate `Intercept`

, `Variance`

, and `DoF`

. For example, if you want to simulate data from this model, then you must specify `Variance`

and `DoF`

.

Not all properties of a `regARIMA`

model are modifiable. To change them directly, you must redefine the model using `regARIMA`

. Nonmodifiable properties include:

`P`

, which is the compound autoregressive polynomial degree. The software determines`P`

from*p*,*d*,*p*, and_{s}*s*. For details on notation, see Regression Model with ARIMA Time Series Errors.`Q`

, which is the compound moving average degree. The software determines`Q`

from*q*and*q*_{s}`DoF`

, which is the degrees of freedom for models having a*t*-distributed innovation process

Though they are not explicitly properties, you cannot reassign or print the lag structure using `ARLags`

, `MALags`

, `SARLags`

, or `SMALags`

. Pass these and the lag structure into `regARIMA`

as name-value pair arguments when you specify the model.

For example, specify a regression model with ARIMA(4,1) errors using `regARIMA`

, where the autoregressive coefficients occur at lags 1 and 4.

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

Mdl = regARIMA with properties: Description: "ARMA(4,1) Error Model (Gaussian Distribution)" Distribution: Name = "Gaussian" Intercept: NaN Beta: [1×0] P: 4 Q: 1 AR: {NaN NaN} at lags [1 4] SAR: {} MA: {NaN} at lag [1] SMA: {} Variance: NaN

You can produce the same results by specifying a regression model with ARMA(1,1) errors, then adding an autoregressive coefficient at the fourth lag.

Mdl = regARIMA(1,0,1); Mdl.AR{4} = NaN

Mdl = regARIMA with properties: Description: "ARMA(4,1) Error Model (Gaussian Distribution)" Distribution: Name = "Gaussian" Intercept: NaN Beta: [1×0] P: 4 Q: 1 AR: {NaN NaN} at lags [1 4] SAR: {} MA: {NaN} at lag [1] SMA: {} Variance: NaN

To change the value of `DoF`

, you must define a new structure for the distribution, and use dot notation to pass it into the model. For example, specify a regression model with AR(1) errors having *t*-distributed innovations.

Mdl = regARIMA('AR',0.5,'Distribution','t')

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

The value of `DoF`

is `NaN`

by default.

Specify that the *t* distribution has 10 degrees of freedom.

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

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

`regARIMA`

| `estimate`

| `simulate`

| `forecast`

- Create Regression Models with ARIMA Errors
- Specify the Default Regression Model with ARIMA Errors
- Create Regression Models with AR Errors
- Create Regression Models with MA Errors
- Create Regression Models with ARMA Errors
- Create Regression Models with SARIMA Errors
- Specify ARIMA Error Model Innovation Distribution