ARMA Model Specifications

Default ARMA Model

This example shows how to use the shorthand arima(p,D,q) syntax to specify the default ARMA(p, q) model,

$${y_t} = 6 + 0.2{y_{t - 1}} - 0.3{y_{t - 2}} + 3{x_t} + {\varepsilon _t} + 0.1{\varepsilon _{t - 1}}$$

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

Specify the default ARMA(1,1) model:

model = arima(1,0,1)
model = 

    ARIMA(1,0,1) Model:
    --------------------
    Distribution: Name = 'Gaussian'
               P: 1
               D: 0
               Q: 1
        Constant: NaN
              AR: {NaN} at Lags [1]
             SAR: {}
              MA: {NaN} at Lags [1]
             SMA: {}
        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 object using dot notation, or input it (along with data) to estimate.

ARMA Model with No Constant Term

This example shows how to specify an ARMA(p, q) model with constant term equal to zero. Use name-value syntax to specify a model that differs from the default model.

Specify an ARMA(2,1) model with no constant term,

$${y_t} = {\phi _1}{y_{t - 1}} + {\phi _2}{y_{t - 2}} + {\varepsilon _t} + {\theta _1}{\varepsilon _{t - 1}},$$

where the innovation distribution is Gaussian with constant variance.

model = arima('ARLags',1:2,'MALags',1,'Constant',0)
model = 

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

The ArLags and MaLags name-value pair arguments specify the lags corresponding to nonzero AR and MA coefficients, respectively. The property Constant in the created model object is equal to 0, as specified. The model has default values for all other properties, including NaN values as placeholders for the unknown parameters: the AR and MA coefficients, and scalar variance.

You can modify the created model using dot notation, or input it (along with data) to estimate.

ARMA Model with Known Parameter Values

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

Specify the ARMA(1,1) model

$${y_t} = 0.3 + 0.7\phi {y_{t - 1}} + {\varepsilon _t} + 0.4{\varepsilon _{t - 1}},$$

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

tdist = struct('Name','t','DoF',8);
model = arima('Constant',0.3,'AR',0.7,'MA',0.4,...
						'Distribution',tdist,'Variance',0.15)
model = 

    ARIMA(1,0,1) Model:
    --------------------
    Distribution: Name = 't', DoF = 8
               P: 1
               D: 0
               Q: 1
        Constant: 0.3
              AR: {0.7} at Lags [1]
             SAR: {}
              MA: {0.4} at Lags [1]
             SMA: {}
        Variance: 0.15

Because all parameter values are specified, the created model has no NaN values. The functions simulate and forecast don't accept input models with NaN values.

See Also

| | | |

Related Examples

More About

Was this topic helpful?