## Create Regression Models with SARIMA Errors

### SARMA Error Model Without an Intercept

This example shows how to specify a regression model with SARMA errors without a regression intercept.

Specify the default regression model with $$SARMA(1,1)\times (2,1,1{)}_{4}$$ errors:

$$\begin{array}{c}{y}_{t}={X}_{t}\beta +{u}_{t}\\ \left(1-{a}_{1}L\right)\left(1-{A}_{4}{L}^{4}-{A}_{8}{L}^{8}\right)\left(1-{L}^{4}\right){u}_{t}=\left(1+{b}_{1}L\right)\left(1+{B}_{4}{L}^{4}\right){\epsilon}_{t}.\end{array}$$

Mdl = regARIMA('ARLags',1,'SARLags',[4, 8],... 'Seasonality',4,'MALags',1,'SMALags',4,'Intercept',0)

Mdl = regARIMA with properties: Description: "ARMA(1,1) Error Model Seasonally Integrated with Seasonal AR(8) and MA(4) (Gaussian Distribution)" SeriesName: "Y" Distribution: Name = "Gaussian" Intercept: 0 Beta: [1×0] P: 13 Q: 5 AR: {NaN} at lag [1] SAR: {NaN NaN} at lags [4 8] MA: {NaN} at lag [1] SMA: {NaN} at lag [4] Seasonality: 4 Variance: NaN

The name-value pair argument:

`'ARLags',1`

specifies which lags have nonzero coefficients in the nonseasonal autoregressive polynomial, so $$a(L)=(1-{a}_{1}L)$$.`'SARLags',[4 8]`

specifies which lags have nonzero coefficients in the seasonal autoregressive polynomial, so $$A(L)=(1-{A}_{4}{L}^{4}-{A}_{8}{L}^{8})$$.`'MALags',1`

specifies which lags have nonzero coefficients in the nonseasonal moving average polynomial, so $$b(L)=(1+{b}_{1}L)$$.`'SMALags',4`

specifies which lags have nonzero coefficients in the seasonal moving average polynomial, so $$B(L)=(1+{B}_{4}{L}^{4})$$.`'Seasonality',4`

specifies the degree of seasonal integration and corresponds to $$(1-{L}^{4})$$.

The software sets `Intercept`

to 0, but all other parameters in `Mdl`

are `NaN`

values by default.

Property `P`

= *p* + *D* + $${p}_{s}$$ + s = 1 + 0 + 8 + 4 = 13, and property `Q`

= *q* + $${q}_{s}$$ = 1 + 4 = 5. Therefore, the software requires at least 13 presample observation to initialize `Mdl`

.

Since `Intercept`

is not a `NaN`

, it is an equality constraint during estimation. In other words, if you pass `Mdl`

and data into `estimate`

, then `estimate`

sets `Intercept`

to 0 during estimation.

You can modify the properties of `Mdl`

using dot notation.

Be aware that the regression model intercept (`Intercept`

) is not identifiable in regression models with ARIMA errors. If you want to estimate `Mdl`

, then you must set `Intercept`

to a value using, for example, dot notation. Otherwise, `estimate`

might return a spurious estimate of `Intercept`

.

### Known Parameter Values for a Regression Model with SARIMA Errors

This example shows how to specify values for all parameters of a regression model with SARIMA errors.

Specify the regression model with $$SARIMA(1,1,1)\times (2,1,0{)}_{12}$$ errors:

$$\begin{array}{c}{y}_{t}={X}_{t}\beta +{u}_{t}\\ \left(1-0.2L\right)\left(1-L\right)\left(1-0.25{L}^{12}-0.1{L}^{24}\right)\left(1-{L}^{12}\right){u}_{t}=\left(1+0.15L\right){\epsilon}_{t},\end{array}$$

where $${\epsilon}_{t}$$ is Gaussian with unit variance.

Mdl = regARIMA('AR',0.2,'SAR',{0.25, 0.1},'SARLags',[12 24],... 'D',1,'Seasonality',12,'MA',0.15,'Intercept',0,'Variance',1)

Mdl = regARIMA with properties: Description: "ARIMA(1,1,1) Error Model Seasonally Integrated with Seasonal AR(24) (Gaussian Distribution)" SeriesName: "Y" Distribution: Name = "Gaussian" Intercept: 0 Beta: [1×0] P: 38 D: 1 Q: 1 AR: {0.2} at lag [1] SAR: {0.25 0.1} at lags [12 24] MA: {0.15} at lag [1] SMA: {} Seasonality: 12 Variance: 1

The parameters in `Mdl`

do not contain `NaN`

values, and therefore there is no need to estimate `Mdl`

. However, you can simulate or forecast responses by passing `Mdl`

to `simulate`

or `forecast`

.

### Regression Model with SARIMA Errors and t Innovations

This example shows how to set the innovation distribution of a regression model with SARIMA errors to a *t* distribution.

Specify the regression model with $$SARIMA(1,1,1)\times (2,1,0{)}_{12}$$ errors:

$$\begin{array}{c}{y}_{t}={X}_{t}\beta +{u}_{t}\\ \left(1-0.2L\right)\left(1-L\right)\left(1-0.25{L}^{12}-0.1{L}^{24}\right)\left(1-{L}^{12}\right){u}_{t}=\left(1+0.15L\right){\epsilon}_{t},\end{array}$$

where $${\epsilon}_{t}$$ has a *t* distribution with the default degrees of freedom and unit variance.

Mdl = regARIMA('AR',0.2,'SAR',{0.25, 0.1},'SARLags',[12 24],... 'D',1,'Seasonality',12,'MA',0.15,'Intercept',0,... 'Variance',1,'Distribution','t')

Mdl = regARIMA with properties: Description: "ARIMA(1,1,1) Error Model Seasonally Integrated with Seasonal AR(24) (t Distribution)" SeriesName: "Y" Distribution: Name = "t", DoF = NaN Intercept: 0 Beta: [1×0] P: 38 D: 1 Q: 1 AR: {0.2} at lag [1] SAR: {0.25 0.1} at lags [12 24] MA: {0.15} at lag [1] SMA: {} Seasonality: 12 Variance: 1

The default degrees of freedom is `NaN`

. If you don't know the degrees of freedom, then you can estimate it by passing `Mdl`

and the data to `estimate`

.

Specify a $${t}_{10}$$ distribution.

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

Mdl = regARIMA with properties: Description: "ARIMA(1,1,1) Error Model Seasonally Integrated with Seasonal AR(24) (t Distribution)" SeriesName: "Y" Distribution: Name = "t", DoF = 10 Intercept: 0 Beta: [1×0] P: 38 D: 1 Q: 1 AR: {0.2} at lag [1] SAR: {0.25 0.1} at lags [12 24] MA: {0.15} at lag [1] SMA: {} Seasonality: 12 Variance: 1

You can simulate or forecast responses by passing `Mdl`

to `simulate`

or `forecast`

because `Mdl`

is completely specified.

In applications, such as simulation, the software normalizes the random *t* innovations. In other words, `Variance`

overrides the theoretical variance of the *t* random variable (which is `DoF`

/(`DoF`

- 2)), but preserves the kurtosis of the distribution.

## See Also

`regARIMA`

| `estimate`

| `simulate`

| `forecast`

## Related Examples

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