Main Content

Creating Univariate Conditional Mean Models

This topic shows how to represent various autoregressive integrated moving average (ARIMA) models, which are univariate conditional mean models, as an arima model object, and it shows how to interpret the property values of a specified object.

Default ARIMA Model

The default ARIMA(p,D,q) model in Econometrics Toolbox™ is the nonseasonal model of the form

ΔDyt=c+ϕ1ΔDyt1++ϕpΔDytp+θ1εt1++θqεtq+εt.

You can write this equation in condensed form using lag operator notation:

ϕ(L)(1L)Dyt=c+θ(L)εt

In either equation, the default innovation distribution is Gaussian with mean zero and constant variance.

At the command line, you can specify a model of this form using the shorthand syntax arima(p,D,q). For the input arguments p, D, and q, enter the number of nonseasonal AR terms (p), the order of nonseasonal integration (D), and the number of nonseasonal MA terms (q), respectively.

When you use this shorthand syntax, arima creates an arima model with these default property values.

Property NameProperty Data Type
ARCell vector of NaNs
BetaEmpty vector [] of regression coefficients corresponding to exogenous covariates
ConstantNaN
DDegree of nonseasonal integration, D
Distribution"Gaussian"
MACell vector of NaNs
PNumber of AR terms plus degree of integration, p + D
QNumber of MA terms, q
SARCell vector of NaNs
SMACell vector of NaNs
VarianceNaN

To assign nondefault values to any properties, you can modify the created model object using dot notation.

Notice that the inputs D and q are the values arima assigns to properties D and Q. However, the input argument p is not necessarily the value arima assigns to the model property P. P stores the number of presample observations needed to initialize the AR component of the model. For nonseasonal models, the required number of presample observations is p + D.

To illustrate, consider specifying the ARIMA(2,1,1) model

(1ϕ1Lϕ2L2)(1L)1yt=c+(1+θ1L)εt,

where the innovation process is Gaussian with (unknown) constant variance.

Mdl = arima(2,1,1)
Mdl = 

  arima with properties:

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

Notice that the model property P does not have value 2 (the AR degree). With the integration, a total of p + D (here, 2 + 1 = 3) presample observations are needed to initialize the AR component of the model.

The created model, Mdl, has NaNs for all parameters. A NaN value signals that a parameter needs to be estimated or otherwise specified by the user. All parameters must be specified to forecast or simulate the model.

To estimate parameters, input the model object (along with data) to estimate. This returns a new fitted arima model object. The fitted model object has parameter estimates for each input NaN value.

Calling arima without any input arguments returns an ARIMA(0,0,0) model specification with default property values:

DefaultMdl = arima
DefaultMdl = 

  arima with properties:

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

Specify Nonseasonal Models Using Name-Value Arguments

The best way to specify models to arima is using name-value arguments. You do not need, nor are you able, to specify a value for every model object property. arima assigns default values to any properties you do not (or cannot) specify.

In condensed, lag operator notation, nonseasonal ARIMA(p,D,q) models are of the form

ϕ(L)(1L)Dyt=c+θ(L)εt.(1)

You can extend this model to an ARIMAX(p,D,q) model with the linear inclusion of exogenous variables. This model has the form

ϕ(L)yt=c+xtβ+θ(L)εt,(2)
where c* = c/(1–L)D and θ*(L) = θ(L)/(1–L)D.

Tip

If you specify a nonzero D, then Econometrics Toolbox differences the response series yt before the predictors enter the model. You should preprocess the exogenous covariates xt by testing for stationarity and differencing if any are unit root nonstationary. If any nonstationary exogenous covariate enters the model, then the false negative rate for significance tests of β can increase.

For the distribution of the innovations, εt, there are two choices:

  • Independent and identically distributed (iid) Gaussian or Student’s t with a constant variance, σε2.

  • Dependent Gaussian or Student’s t with a conditional variance process, σt2. Specify the conditional variance model using a garch, egarch, or gjr model.

The arima default for the innovations is an iid Gaussian process with constant (scalar) variance.

In order to estimate, forecast, or simulate a model, you must specify the parametric form of the model (e.g., which lags correspond to nonzero coefficients, the innovation distribution) and any known parameter values. You can set any unknown parameters equal to NaN, and then input the model to estimate (along with data) to get estimated parameter values.

arima (and estimate) returns a model corresponding to the model specification. You can modify models to change or update the specification. Input models (with no NaN values) to forecast or simulate for forecasting and simulation, respectively. Here are some example specifications using name-value arguments.

ModelSpecification
  • yt=c+ϕ1yt1+εt

  • εt=σεzt

  • zt Gaussian

arima('AR',NaN) or arima(1,0,0)
  • yt=εt+θ1εt1+θ2εt2

  • εt=σεzt

  • zt Student’s t with unknown degrees of freedom

arima('Constant',0,'MA',{NaN,NaN},...
'Distribution','t')
  • (10.8L)(1L)yt=0.2+(1+0.6L)εt

  • εt=0.1zt

  • zt Student’s t with eight degrees of freedom

arima('Constant',0.2,'AR',0.8,'MA',0.6,'D',1,...
'Variance',0.1^2,'Distribution',struct('Name','t','DoF',8))
  • (1+0.5L)(1L)1Δyt=xt[52]+εt

  • εt~N(0,1)

arima('Constant',0,'AR',-0.5,'D',1,'Beta',[-5 2])

You can specify the following name-value arguments to create nonseasonal arima models.

Name-Value Arguments for Nonseasonal ARIMA Models

NameCorresponding Model Term(s) in Equation 1When to Specify
ARNonseasonal AR coefficients, ϕ1,,ϕp

To set equality constraints for the AR coefficients. For example, to specify the AR coefficients in the model

yt=0.8yt10.2yt2+εt,

specify 'AR',{0.8,-0.2}.

You only need to specify the nonzero elements of AR. If the nonzero coefficients are at nonconsecutive lags, specify the corresponding lags using ARLags.

Any coefficients you specify must correspond to a stable AR operator polynomial.

ARLagsLags corresponding to nonzero, nonseasonal AR coefficients

ARLags is not a model property.

Use this argument as a shortcut for specifying AR when the nonzero AR coefficients correspond to nonconsecutive lags. For example, to specify nonzero AR coefficients at lags 1 and 12, e.g., yt=ϕ1yt1+ϕ12yt12+εt,specify 'ARLags',[1,12].

Use AR and ARLags together to specify known nonzero AR coefficients at nonconsecutive lags. For example, if in the given AR(12) model ϕ1=0.6 and ϕ12=0.3, specify 'AR',{0.6,-0.3},'ARLags',[1,12].

BetaValues of the coefficients of the exogenous covariates

Use this argument to specify the values of the coefficients of the exogenous variables. For example, use 'Beta',[0.5 7 -2] to specify β=[0.572].

By default, Beta is an empty vector.

ConstantConstant term, cTo set equality constraints for c. For example, for a model with no constant term, specify 'Constant',0.
By default, Constant has value NaN.
DDegree of nonseasonal differencing, DTo specify a degree of nonseasonal differencing greater than zero. For example, to specify one degree of differencing, specify 'D',1.
By default, D has value 0 (meaning no nonseasonal integration).
DistributionDistribution of the innovation processUse this argument to specify a Student’s t innovation distribution. By default, the innovation distribution is Gaussian.
For example, to specify a t distribution with unknown degrees of freedom, specify 'Distribution','t'.
To specify a t innovation distribution with known degrees of freedom, assign Distribution a data structure with fields Name and DoF. For example, for a t distribution with nine degrees of freedom, specify 'Distribution',struct('Name','t','DoF',9).
MANonseasonal MA coefficients, θ1,,θq

To set equality constraints for the MA coefficients. For example, to specify the MA coefficients in the model

yt=εt+0.5εt1+0.2εt2,

specify 'MA',{0.5,0.2}.

You only need to specify the nonzero elements of MA. If the nonzero coefficients are at nonconsecutive lags, specify the corresponding lags using MALags.

Any coefficients you specify must correspond to an invertible MA polynomial.

MALagsLags corresponding to nonzero, nonseasonal MA coefficients

MALags is not a model property.

Use this argument as a shortcut for specifying MA when the nonzero MA coefficients correspond to nonconsecutive lags. For example, to specify nonzero MA coefficients at lags 1 and 4, e.g.,

yt=εt+θ1εt1+θ4εt4,

specify 'MALags',[1,4].

Use MA and MALags together to specify known nonzero MA coefficients at nonconsecutive lags. For example, if in the given MA(4) model θ1=0.5 and θ4=0.2, specify 'MA',{0.4,0.2},'MALags',[1,4].

Variance
  • Scalar variance of the innovation process, σε2

  • Conditional variance process, σt2

  • To set equality constraints for σε2. For example, for a model with known variance 0.1, specify 'Variance',0.1. By default, Variance has value NaN.

  • To specify a conditional variance model, σt2. Set 'Variance' equal to a conditional variance model object, e.g., a garch model object.

Note

You cannot assign values to the properties P and Q. For nonseasonal models,

  • arima sets P equal to p + D

  • arima sets Q equal to q

Specify Multiplicative Models Using Name-Value Arguments

For a time series with periodicity s, define the degree ps seasonal AR operator polynomial, Φ(L)=(1Φ1Lp1ΦpsLps), and the degree qs seasonal MA operator polynomial, Θ(L)=(1+Θ1Lq1++ΘqsLqs). Similarly, define the degree p nonseasonal AR operator polynomial, ϕ(L)=(1ϕ1LϕpLp), and the degree q nonseasonal MA operator polynomial,

θ(L)=(1+θ1L++θqLq).(3)

A multiplicative ARIMA model with degree D nonseasonal integration and degree s seasonality is given by

ϕ(L)Φ(L)(1L)D(1Ls)yt=c+θ(L)Θ(L)εt.(4)
The innovation series can be an independent or dependent Gaussian or Student’s t process. The arima default for the innovation distribution is an iid Gaussian process with constant (scalar) variance.

In addition to the arguments for specifying nonseasonal models (described in Name-Value Arguments for Nonseasonal ARIMA Models), you can specify these name-value arguments to create a multiplicative arima model. You can extend an ARIMAX model similarly to include seasonal effects.

Name-Value Arguments for Seasonal ARIMA Models

ArgumentCorresponding Model Term(s) in Equation 4When to Specify
SARSeasonal AR coefficients, Φ1,,Φps

To set equality constraints for the seasonal AR coefficients. When specifying AR coefficients, use the sign opposite to what appears in Equation 4 (that is, use the sign of the coefficient as it would appear on the right side of the equation).

Use SARLags to specify the lags of the nonzero seasonal AR coefficients. Specify the lags associated with the seasonal polynomials in the periodicity of the observed data (e.g., 4, 8,... for quarterly data, or 12, 24,... for monthly data), and not as multiples of the seasonality (e.g., 1, 2,...).

For example, to specify the model

(10.8L)(10.2L12)yt=εt,

specify 'AR',0.8,'SAR',0.2,'SARLags',12.

Any coefficient values you enter must correspond to a stable seasonal AR polynomial.

SARLagsLags corresponding to nonzero seasonal AR coefficients, in the periodicity of the observed series

SARLags is not a model property.

Use this argument when specifying SAR to indicate the lags of the nonzero seasonal AR coefficients.

For example, to specify the model

(1ϕL)(1Φ12L12)yt=εt,

specify 'ARLags',1,'SARLags',12.

SMASeasonal MA coefficients, Θ1,,Θqs

To set equality constraints for the seasonal MA coefficients.

Use SMALags to specify the lags of the nonzero seasonal MA coefficients. Specify the lags associated with the seasonal polynomials in the periodicity of the observed data (e.g., 4, 8,... for quarterly data, or 12, 24,... for monthly data), and not as multiples of the seasonality (e.g., 1, 2,...).

For example, to specify the model

yt=(1+0.6L)(1+0.2L12)εt,

specify 'MA',0.6,'SMA',0.2,'SMALags',12.

Any coefficient values you enter must correspond to an invertible seasonal MA polynomial.

SMALagsLags corresponding to the nonzero seasonal MA coefficients, in the periodicity of the observed series

SMALags is not a model property.

Use this argument when specifying SMA to indicate the lags of the nonzero seasonal MA coefficients.

For example, to specify the model

yt=(1+θ1L)(1+Θ4L4)εt,

specify 'MALags',1,'SMALags',4.

SeasonalitySeasonal periodicity, sTo specify the degree of seasonal integration s in the seasonal differencing polynomial Δs = 1 – Ls. For example, to specify the periodicity for seasonal integration of monthly data, specify 'Seasonality',12.
If you specify nonzero Seasonality, then the degree of the whole seasonal differencing polynomial is one. By default, Seasonality has value 0 (meaning periodicity and no seasonal integration).

Note

You cannot assign values to the properties P and Q. For multiplicative ARIMA models,

  • arima sets P equal to p + D + ps + s

  • arima sets Q equal to q + qs

Specify Conditional Mean Model Using Econometric Modeler App

You can specify the lag structure and innovation distribution of seasonal and nonseasonal conditional mean models using the Econometric Modeler app. The app treats all coefficients as unknown and estimable, including the degrees of freedom parameter for a t innovation distribution.

At the command line, open the Econometric Modeler app.

econometricModeler

Alternatively, open the app from the apps gallery (see Econometric Modeler).

In the app, you can see all supported models by selecting a time series variable for the response in the Time Series pane. Then, on the Econometric Modeler tab, in the Models section, click the arrow to display the models gallery.

Models gallery with subsections for ARMA/ARIMA MODELS, GARCH MODELS, and REGRESSION MODELS.

The ARMA/ARIMA Models section contains supported conditional mean models.

For conditional mean model estimation, SARIMA and SARIMAX are the most flexible models. You can create any conditional mean model that excludes exogenous predictors by clicking SARIMA, or you can create any conditional mean model that includes at least one exogenous predictor by clicking SARIMAX.

After you select a model, the app displays the Type Model Parameters dialog box, where Type is the model type. This figure shows the SARIMAX Model Parameters dialog box.

SARIMAX Model Parameters window is open with Lag Order tab selected and the Include Constant Term check box selected.

Adjustable parameters in the dialog box depend on Type. In general, adjustable parameters include:

  • A model constant and linear regression coefficients corresponding to predictor variables

  • Time series component parameters, which include seasonal and nonseasonal lags and degrees of integration

  • The innovation distribution

As you adjust parameter values, the equation in the Model Equation section changes to match your specifications. Adjustable parameters correspond to input and name-value arguments described in the previous sections and in the arima reference page.

For more details on specifying models using the app, see Fitting Models to Data and Specifying Univariate Lag Operator Polynomials Interactively.

What Are Conditional Mean Models?

Unconditional vs. Conditional Mean

For a univariate random variable yt, the unconditional mean is simply the expected value, E(yt). In contrast, the conditional mean of yt is the expected value of yt given a conditioning set of variables, Ωt. A conditional mean model specifies a functional form for E(yt|Ωt)..

Static vs. Dynamic Conditional Mean Models

For a static conditional mean model, the conditioning set of variables is measured contemporaneously with the dependent variable yt. An example of a static conditional mean model is the ordinary linear regression model. Given xt, a row vector of exogenous covariates measured at time t, and β, a column vector of coefficients, the conditional mean of yt is expressed as the linear combination

E(yt|xt)=xtβ

(that is, the conditioning set is Ωt=xt).

In time series econometrics, there is often interest in the dynamic behavior of a variable over time. A dynamic conditional mean model specifies the expected value of yt as a function of historical information. Let Ht–1 denote the history of the process available at time t. A dynamic conditional mean model specifies the evolution of the conditional mean, E(yt|Ht1). Examples of historical information are:

  • Past observations, y1, y2,...,yt–1

  • Vectors of past exogenous variables, x1,x2,,xt1

  • Past innovations, ε1,ε2,,εt1

Conditional Mean Models for Stationary Processes

By definition, a covariance stationary stochastic process has an unconditional mean that is constant with respect to time. That is, if yt is a stationary stochastic process, then E(yt)=μ for all times t.

The constant mean assumption of stationarity does not preclude the possibility of a dynamic conditional expectation process. The serial autocorrelation between lagged observations exhibited by many time series suggests the expected value of yt depends on historical information. By Wold’s decomposition [2], you can write the conditional mean of any stationary process yt as

E(yt|Ht1)=μ+i=1ψiεti,(5)
where {εti} are past observations of an uncorrelated innovation process with mean zero, and the coefficients ψi are absolutely summable. E(yt)=μ is the constant unconditional mean of the stationary process.

Any model of the general linear form given by Equation 5 is a valid specification for the dynamic behavior of a stationary stochastic process. Special cases of stationary stochastic processes are the autoregressive (AR) model, moving average (MA) model, and the autoregressive moving average (ARMA) model.

References

[1] Box, George E. P., Gwilym M. Jenkins, and Gregory C. Reinsel. Time Series Analysis: Forecasting and Control. 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.

[2] Wold, Herman. "A Study in the Analysis of Stationary Time Series." Journal of the Institute of Actuaries 70 (March 1939): 113–115. https://doi.org/10.1017/S0020268100011574.

See Also

Apps

Objects

Functions

Related Topics