The default ARIMA(p,D,q) model in Econometrics Toolbox™ is the nonseasonal model of the form
You can write this equation in condensed form usinglag operator notation:
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 syntaxarima(p,D,q)
。For the input argumentsp
,D
, andq
, 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 anarima
model with these default property values.
Property Name | Property Data Type |
---|---|
AR |
Cell vector ofNaN s |
Beta |
Empty vector[] of regression coefficients corresponding to exogenous covariates |
Constant |
NaN |
D |
程度的季节性integration,D |
Distribution |
"Gaussian" |
MA |
Cell vector ofNaN s |
P |
Number of AR terms plus degree of integration,p+D |
Q |
Number of MA terms,q |
SAR |
Cell vector ofNaN s |
SMA |
Cell vector ofNaN s |
Variance |
NaN |
To assign nondefault values to any properties, you can modify the created model object using dot notation.
Notice that the inputsD
andq
are the valuesarima
assigns to propertiesD
andQ
。However, the input argumentp
is not necessarily the valuearima
assigns to the model propertyP
。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 isp+D。
To illustrate, consider specifying the ARIMA(2,1,1) model
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 propertyP
does not have value 2 (the AR degree). With the integration, a total ofp+D(here, 2 + 1 = 3) presample observations are needed to initialize the AR component of the model.
The created model,Mdl
, hasNaN
s for all parameters. ANaN
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) toestimate
。This returns a new fittedarima
model object. The fitted model object has parameter estimates for each inputNaN
value.
Callingarima
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
The best way to specify models toarima
is using name-value pair 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
(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
(2) |
If you specify a nonzeroD
, then Econometrics Toolbox differences the response seriesytbeforethe predictors enter the model. You should preprocess the exogenous covariatesxtby 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’stwith a constant variance, 。
Dependent Gaussian or Student’stwith a conditional variance process,
。Specify the conditional variance model using agarch
,egarch
, orgjr
model.
Thearima
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 toNaN
, and then input the model toestimate
(along with data) to get estimated parameter values.
arima
(andestimate
) returns a model corresponding to the model specification. You can modify models to change or update the specification. Input models (with noNaN
values) toforecast
orsimulate
for forecasting and simulation, respectively. Here are some example specifications using name-value arguments.
Model | Specification |
---|---|
|
arima('AR',NaN) orarima(1,0,0) |
|
arima('Constant',0,'MA',{NaN,NaN},... |
|
arima('Constant',0.2,'AR',0.8,'MA',0.6,'D',1,... |
|
arima('Constant',0,'AR',-0.5,'D',1,'Beta',[-5 2]) |
You can specify the following name-value arguments to create nonseasonalarima
models.
Name-Value Arguments for Nonseasonal ARIMA Models
Name | Corresponding Model Term(s) inEquation 1 | When to Specify |
---|---|---|
AR |
Nonseasonal AR coefficients, | To set equality constraints for the AR coefficients. For example, to specify the AR coefficients in the model
specify You only need to specify the nonzero elements of Any coefficients you specify must correspond to a stable AR operator polynomial. |
ARLags |
Lags corresponding to nonzero, nonseasonal AR coefficients |
Use this argument as a shortcut for specifying Use |
Beta |
Values of the coefficients of the exogenous covariates | Use this argument to specify the values of the coefficients of the exogenous variables. For example, use By default, |
Constant |
Constant term,c | To set equality constraints forc。对于example, for a model with no constant term, specify'Constant',0 。By default, Constant has valueNaN 。 |
D |
Degree of nonseasonal differencing,D | To specify a degree of nonseasonal differencing greater than zero. For example, to specify one degree of differencing, specify'D',1 。By default, D has value0 (meaning no nonseasonal integration). |
Distribution |
Distribution of the innovation process | Use this argument to specify a Student’stinnovation distribution. By default, the innovation distribution is Gaussian. 对于example, to specify atdistribution with unknown degrees of freedom, specify 'Distribution','t' 。To specify atinnovation distribution with known degrees of freedom, assign Distribution a data structure with fieldsName andDoF 。对于example, for atdistribution with nine degrees of freedom, specify'Distribution',struct('Name','t','DoF',9) 。 |
MA |
Nonseasonal MA coefficients, | To set equality constraints for the MA coefficients. For example, to specify the MA coefficients in the model
specify You only need to specify the nonzero elements of Any coefficients you specify must correspond to an invertible MA polynomial. |
MALags |
Lags corresponding to nonzero, nonseasonal MA coefficients |
Use this argument as a shortcut for specifying
specify Use |
Variance |
|
|
You cannot assign values to the propertiesP
andQ
。For nonseasonal models,
arima
setsP
equal top+D
arima
setsQ
equal toq
For a time series with periodicitys, define the degreepsseasonal AR operator polynomial, , and the degreeqsseasonal MA operator polynomial, 。Similarly, define the degreepnonseasonal AR operator polynomial, , and the degreeqnonseasonal MA operator polynomial,
(3) |
A multiplicative ARIMA model with degreeDnonseasonal integration and degreesseasonality is given by
(4) |
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 inName-Value Arguments for Nonseasonal ARIMA Models), you can specify these name-value arguments to create a multiplicativearima
model. You can extend an ARIMAX model similarly to include seasonal effects.
Name-Value Arguments for Seasonal ARIMA Models
Argument | Corresponding Model Term(s) inEquation 4 | When to Specify |
---|---|---|
SAR |
Seasonal AR coefficients, | To set equality constraints for the seasonal AR coefficients. When specifying AR coefficients, use the sign opposite to what appears inEquation 4(that is, use the sign of the coefficient as it would appear on the right side of the equation). Use 对于example, to specify the model
specify Any coefficient values you enter must correspond to a stable seasonal AR polynomial. |
SARLags |
Lags corresponding to nonzero seasonal AR coefficients, in the periodicity of the observed series |
Use this argument when specifying 对于example, to specify the model
specify |
SMA |
Seasonal MA coefficients, | To set equality constraints for the seasonal MA coefficients. Use 对于example, to specify the model
specify Any coefficient values you enter must correspond to an invertible seasonal MA polynomial. |
SMALags |
Lags corresponding to the nonzero seasonal MA coefficients, in the periodicity of the observed series |
Use this argument when specifying 对于example, to specify the model
specify |
Seasonality |
Seasonal periodicity,s | To specify the degree of seasonal integrationsin the seasonal differencing polynomialΔs= 1 –Ls。对于example, to specify the periodicity for seasonal integration of monthly data, specify“季节性”12 。If you specify nonzero Seasonality , then the degree of the whole seasonal differencing polynomial is one. By default,Seasonality has value0 (meaning periodicity and no seasonal integration). |
You cannot assign values to the propertiesP
andQ
。For multiplicative ARIMA models,
arima
setsP
equal top+D+ps+s
arima
setsQ
equal toq+qs
You can specify the lag structure and innovation distribution of seasonal and nonseasonal conditional mean models using theEconometric Modelerapp. The app treats all coefficients as unknown and estimable, including the degrees of freedom parameter for atinnovation distribution.
At the command line, open theEconometric Modelerapp.
econometricModeler
Alternatively, open the app from the apps gallery (seeEconometric Modeler).
In the app, you can see all supported models by selecting a time series variable for the response in theData Browser。Then, on theEconometric Modelertab, in theModelssection, click the arrow to display the models gallery.
TheARMA/ARIMA Modelssection 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 clickingSARIMA, or you can create any conditional mean model that includes at least one exogenous predictor by clickingSARIMAX。
After you select a model, the app displays theType
Model Parametersdialog box, whereType
is the model type. This figure shows theSARIMAX Model Parametersdialog box.
Adjustable parameters in the dialog box depend onType
。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 theModel Equation部分改变以匹配您的规范。Adjustable parameters correspond to input and name-value pair arguments described in the previous sections and in thearima
reference page.
For more details on specifying models using the app, seeFitting Models to DataandSpecifying Lag Operator Polynomials Interactively。