This example shows how to use the shorthand `arima(p,D,q)`

syntax to specify the default ARIMA(*p*, *D*, *q*) model,

$${\Delta}^{D}{y}_{t}=c+{\varphi}_{1}{\Delta}^{D}{y}_{t-1}+\dots +{\varphi}_{p}{\Delta}^{D}{y}_{t-p}+{\epsilon}_{t}+{\theta}_{1}{\epsilon}_{t-1}+\dots +{\theta}_{q}{\epsilon}_{t-q},$$

where $${\Delta}^{D}{y}_{t}$$ is a $${D}^{th}$$ differenced time series. You can write this model in condensed form using lag operator notation:

$$\varphi (L)(1-L{)}^{D}{y}_{t}=c+\theta (L){\epsilon}_{t}.$$

By default, all parameters in the created model object have unknown values, and the innovation distribution is Gaussian with constant variance.

Specify the default ARIMA(1,1,1) model:

model = arima(1,1,1)

model = arima with properties: Description: "ARIMA(1,1,1) Model (Gaussian Distribution)" Distribution: Name = "Gaussian" P: 2 D: 1 Q: 1 Constant: NaN AR: {NaN} at lag [1] SAR: {} MA: {NaN} at lag [1] SMA: {} Seasonality: 0 Beta: [1×0] Variance: NaN

The output shows that the created model object, `model`

, has `NaN`

values for all model parameters: the constant term, the AR and MA coefficients, and the variance. You can modify the created model using dot notation, or input it (along with data) to `estimate`

.

The property `P`

has value 2 (*p* + *D*). This is the number of presample observations needed to initialize the AR model.

This example shows how to specify an ARIMA(*p*, *D*, *q*) model with known parameter values. You can use such a fully specified model as an input to `simulate`

or `forecast`

.

Specify the ARIMA(2,1,1) model

$$\Delta {y}_{t}=0.4+0.8\Delta {y}_{t-1}-0.3\Delta {y}_{t-2}+{\epsilon}_{t}+0.5{\epsilon}_{t-1},$$

where the innovation distribution is Student's *t* with 10 degrees of freedom, and constant variance 0.15.

tdist = struct('Name','t','DoF',10); model = arima('Constant',0.4,'AR',{0.8,-0.3},'MA',0.5,... 'D',1,'Distribution',tdist,'Variance',0.15)

model = arima with properties: Description: "ARIMA(2,1,1) Model (t Distribution)" Distribution: Name = "t", DoF = 10 P: 3 D: 1 Q: 1 Constant: 0.4 AR: {0.8 -0.3} at lags [1 2] SAR: {} MA: {0.5} at lag [1] SMA: {} Seasonality: 0 Beta: [1×0] Variance: 0.15

The name-value pair argument `D`

specifies the degree of nonseasonal integration (*D*).

Because all parameter values are specified, the created model object has no `NaN`

values. The functions `simulate`

and `forecast`

don't accept input models with `NaN`

values.

In the **Econometric
Modeler** app, you can specify the lag structure, presence of a constant,
and innovation distribution of an
ARIMA(*p*,*D*,*q*) model by
following these steps. All specified coefficients are unknown but estimable parameters.

At the command line, open the

**Econometric Modeler**app.econometricModeler

Alternatively, open the app from the apps gallery (see

**Econometric Modeler**).In the

**Data Browser**, select the response time series to which the model will be fit.On the

**Econometric Modeler**tab, in the**Models**section, click**ARIMA**. To create ARIMAX models, see ARIMAX Model Specifications.The

**ARIMA Model Parameters**dialog box appears.Specify the lag structure. To specify an ARIMA(

*p*,*D*,*q*) model that includes all AR lags from 1 through*p*and all MA lags from 1 through*q*, use the**Lag Order**tab. For the flexibility to specify the inclusion of particular lags, use the**Lag Vector**tab. For more details, see Specifying Lag Operator Polynomials Interactively. Regardless of the tab you use, you can verify the model form by inspecting the equation in the**Model Equation**section.

For example:

To specify an ARIMA(3,1,2) model that includes a constant, includes all consecutive AR and MA lags from 1 through their respective orders, and has a Gaussian innovation distribution:

Set

**Degree of Integration**to`1`

.Set

**Autoregressive Order**to`3`

.Set

**Moving Average Order**to`2`

.

To specify an ARIMA(3,1,2) model that includes all AR and MA lags from 1 through their respective orders, has a Gaussian distribution, but does not include a constant:

Set

**Degree of Integration**to`1`

.Set

**Autoregressive Order**to`3`

.Set

**Moving Average Order**to`2`

.Clear the

**Include Constant Term**check box.

To specify an ARIMA(8,1,4) model containing nonconsecutive lags

$$\left(1-{\varphi}_{1}L-{\varphi}_{4}{L}^{4}-{\varphi}_{8}{L}^{8}\right)\left(1-L\right){y}_{t}=\left(1+{\theta}_{1}{L}^{1}+{\theta}_{4}{L}^{4}\right){\epsilon}_{t},$$

where

*ε*is a series of IID Gaussian innovations:_{t}Click the

**Lag Vector**tab.Set

**Degree of Integration**to`1`

.Set

**Autoregressive Lags**to`1 4 8`

.Set

**Moving Average Lags**to`1 4`

.Clear the

**Include Constant Term**check box.

To specify an ARIMA(3,1,2) model that includes all consecutive AR and MA lags through their respective orders and a constant term, and has

*t*-distribution innovations:Set

**Degree of Integration**to`1`

.Set

**Autoregressive Order**to`3`

.Set

**Moving Average Order**to`2`

.Click the

**Innovation Distribution**button, then select`t`

.

The degrees of freedom parameter of the

*t*distribution is an unknown but estimable parameter.

After you specify a model, click **Estimate** to
estimate all unknown parameters in the model.

- Econometric Modeler App Overview
- Specifying Lag Operator Polynomials Interactively
- Specify Conditional Mean Models
- Modify Properties of Conditional Mean Model Objects
- Specify Conditional Mean Model Innovation Distribution