Documentation Center 
On this page… 

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 using lag operator notation:
In either equation, the default innovation distribution is Gaussian with mean zero and constant variance.
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 Name  Property Data Type 

AR  Cell vector of NaNs 
Beta  Empty vector [] of regression coefficients corresponding to exogenous covariates 
Constant  NaN 
D  Degree of nonseasonal integration, D 
Distribution  'Gaussian' 
MA  Cell vector of NaNs 
P  Number of AR terms plus degree of integration, p + D 
Q  Number of MA terms, q 
SAR  Cell vector of NaNs 
SMA  Cell vector of NaNs 
Variance  NaN 
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
where the innovation process is Gaussian with (unknown) constant variance.
Mdl = arima(2,1,1)
Mdl = ARIMA(2,1,1) Model:  Distribution: Name = 'Gaussian' P: 3 D: 1 Q: 1 Constant: NaN AR: {NaN NaN} at Lags [1 2] SAR: {} MA: {NaN} at Lags [1] SMA: {} 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(0,0,0) Model:  Distribution: Name = 'Gaussian' P: 0 D: 0 Q: 0 Constant: NaN AR: {} SAR: {} MA: {} SMA: {} Variance: NaN
The best way to specify models to arima is using namevalue 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
(52) 
You can extend this model to an ARIMAX(p,D,q) model with the linear inclusion of exogenous variables. This model has the form
(53) 
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 y_{t} before the predictors enter the model. You should preprocess the exogenous covariates x_{t} 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, .
Dependent Gaussian or Student's t with a conditional variance process, . 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 namevalue arguments.
Model  Specification 

 arima('AR',NaN) or arima(1,0,0) 
 arima('Constant',0,'MA',{NaN,NaN},... 'Distribution','t') 
 arima('Constant',0.2,'AR',0.8,'MA',0.6,... 'Variance',0.1,'Distribution',... struct('Name','t','DoF',8)) 
arima('AR',0.5,'D',1,'Beta',[5 2]) 
You can specify the following namevalue arguments to create nonseasonal arima models.
NameValue Arguments for Nonseasonal ARIMA Models
Name  Corresponding Model Term(s) in Equation 52  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 '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. 
ARLags  Lags 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., 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 and specify 'AR',{0.6,0.3},'ARLags',[1,12]. 
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 'Beta',[0.5
7 2] to specify
By default, Beta is an empty vector. 
Constant  Constant term, c  To set equality constraints for c. For example,
for a model with no constant term, specify 'Constant',0. By default, Constant has value NaN. 
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 value 0 (meaning no nonseasonal integration). 
Distribution  Distribution of the innovation process  Use 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). 
MA  Nonseasonal MA coefficients,  To set equality constraints for the MA coefficients. For example,
to specify the MA coefficients in the model
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. 
MALags  Lags 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.,
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 and specify 'MA',{0.4,0.2},'MALags',[1,4]. 
Variance 


For a time series with periodicity s, define the degree p_{s} seasonal AR operator polynomial, , and the degree q_{s} seasonal MA operator polynomial, . Similarly, define the degree p nonseasonal AR operator polynomial, , and the degree q nonseasonal MA operator polynomial,
(54) 
A multiplicative ARIMA model with degree D nonseasonal integration and degree s seasonality is given by
(55) 
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 NameValue Arguments for Nonseasonal ARIMA Models), you can specify these namevalue arguments to create a multiplicative arima model. You can extend an ARIMAX model similarly to include seasonal effects.
NameValue Arguments for Seasonal ARIMA Models
Argument  Corresponding Model Term(s) in Equation 55  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
in Equation 55 (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
specify 'AR',0.8,'SAR',0.2,'SARLags',12 .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  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
specify 'ARLags',1,'SARLags',12. 
SMA  Seasonal MA coefficients,  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
specify 'MA',0.6,'SMA',0.2,'SMALags',12. 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  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
specify 'MALags',1,'SMALags',4. 
Seasonality  Seasonal periodicity, s  To specify the degree of seasonal integration s in
the seasonal differencing polynomial Δ_{s} =
1 – L^{s}. 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). 
arima  estimate  forecast  simulate