Main Content

Specify Conditional Mean Models

Default ARIMA Model

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

Δ D y t = c + ϕ 1 Δ D y t - 1 + + ϕ p Δ D y t - p + θ 1 ε t - 1 + + θ q ε t - q + ε t

You can write this equation in condensed form usinglag operator notation:

ϕ ( L ) ( 1 - L ) D y t = c + θ ( L ) ε t

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

一个t the command line, you can specify a model of this form using the shorthand syntaxarima(p,D,q)。For the input argumentsp,D, 和q, enter the number of nonseasonal AR terms (p),非季节一体化的顺序(D),以及非季节的MA条款(q), respectively.

When you use this shorthand syntax,arimacreates anarimamodel with these default property values.

Property Name Property Data Type
一个R Cell vector ofNaNs
beta Empty vector[]与外源协变量相对应的回归系数
持续的 NaN
D Degree of nonseasonal integration,D
Distribution “高斯”
Cell vector ofNaNs
P AR术语数量以及集成程度,p+D
Q Number of MA terms,q
SAR Cell vector ofNaNs
SMA Cell vector ofNaNs
Variance NaN

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

注意输入Dq是值arima分配到属性DQ。However, the input argumentp不一定是价值arimaassigns to the model propertyPPstores 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

( 1 - ϕ 1 L - ϕ 2 L 2 ) ( 1 - L ) 1 y t = c + ( 1 + θ 1 L ) ε t ,

在哪里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 propertyPdoes 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, hasNaNs对于所有参数。一个NaNvalue 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.

要估计参数,请将模型对象(以及数据)输入到估计。This returns a new fittedarimamodel object. The fitted model object has parameter estimates for each inputNaN价值。

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

defaultmdl = arima
defaultmdl = arimawith 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 toarimais using name-value pair arguments. You do not need, nor are you able, to specify a value for every model object property.arimaassigns default values to any properties you do not (or cannot) specify.

In condensed, lag operator notation, nonseasonal ARIMA(p,D,q)模型是形式

ϕ ( L ) ( 1 - L ) D y t = c + θ ( L ) ε t (1)

您可以将此模型扩展到Arimax(p,D,q)模型与外源变量的线性包含。该模型具有形式

ϕ ( L ) y t = c * + x t β + θ * ( L ) ε t , (2)
在哪里c*=c/(1–L)Dθ*(L)=θ(l)/(1–L)D

Tip

如果指定非零D, 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, σ ε 2

  • Dependent Gaussian or Student’stwith a conditional variance process, σ t 2 。Specify the conditional variance model using agarch,埃加奇, 或者gjr模型。

Thearimadefault 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, 和then input the model to估计(与数据一起)获取估计的参数值。

arima(and估计) returns a model corresponding to the model specification. You can modify models to change or update the specification. Input models (with noNaNvalues) to预报或者simulate分别用于预测和仿真。这是使用名称值参数的一些示例规格。

Model 规格
  • y t = c + ϕ 1 y t - 1 + ε t

  • ε t = σ ε z t

  • ztGaussian

arima('AR',NaN)或者Arima(1,0,0)
  • y t = ε t + θ 1 ε t - 1 + θ 2 ε t - 2

  • ε t = σ ε z t

  • ztStudent’st有未知的自由度

arima('Constant',0,'MA',{NaN,NaN},...
“分布”,'t')
  • ( 1 - 0.8 L ) ( 1 - L ) y t = 0.2 + ( 1 + 0.6 L ) ε t

  • ε t = 0.1 z t

  • ztStudent’st有八个自由度

Arima('常数',0.2,'ar',0.8,'ma',0.6,'d',1,...
“方差”,0.1^2,'Distribution',struct('Name','t','DoF',8))
  • ( 1 + 0.5 L ) ( 1 - L ) 1 Δ y t = x t [ - 5 2 ] + ε 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 nonseasonalarima楷模。

非季节Arima模型的名称值论点

的名字 相应的模型术语Equation 1 When to Specify
一个R Nonseasonal AR coefficients, ϕ 1 , , ϕ p

为AR系数设置平等约束。例如,指定模型中的AR系数

y t = 0.8 y t - 1 - 0.2 y t - 2 + ε t ,

specify'ar',{0.8,-0.2}

您只需要指定的非零元素一个R。如果非零系数处于非连续滞后,请使用相应的滞后一个RLags

一个ny coefficients you specify must correspond to a stable AR operator polynomial.

一个RLags Lags corresponding to nonzero, nonseasonal AR coefficients

一个RLags不是模型属性。

利用this argument as a shortcut for specifying一个R当非零AR系数对应于非连续滞后。例如,在滞后1和12上指定非零AR系数,例如 y t = ϕ 1 y t - 1 + ϕ 12 y t - 12 + ε t , specify'ARLags',[1,12]

利用一个R一个RLagstogether to specify known nonzero AR coefficients at nonconsecutive lags. For example, if in the given AR(12) model ϕ 1 = 0.6 ϕ 12 = - 0.3 , specify'ar',{0.6,-0.3},'arlags',[1,12]

beta Values of the coefficients of the exogenous covariates

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

By default,betais an empty vector.

持续的 恒定术语,c To set equality constraints forc。例如,对于没有恒定术语的模型,请指定'Constant',0
By default,持续的has valueNaN
D 非季节差异的程度,D To specify a degree of nonseasonal differencing greater than zero. For example, to specify one degree of differencing, specify'D',1
By default,Dhas value0(meaning no nonseasonal integration).
Distribution Distribution of the innovation process 使用此论点指定学生的tinnovation distribution. By default, the innovation distribution is Gaussian.
For example, to specify atdistribution with unknown degrees of freedom, specify“分布”,'t'
To specify atinnovation distribution with known degrees of freedom, assignDistribution带有字段的数据结构的名字DoF。例如,对于一个tdistribution with nine degrees of freedom, specify'Distribution',struct('Name','t','DoF',9)
Nonseasonal MA coefficients, θ 1 , , θ q

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

y t = ε t + 0.5 ε t - 1 + 0.2 ε t - 2 ,

specify'ma',{0.5,0.2}

您只需要指定的非零元素。如果非零系数处于非连续滞后,请使用相应的滞后嘛Lags

一个ny coefficients you specify must correspond to an invertible MA polynomial.

嘛Lags Lags corresponding to nonzero, nonseasonal MA coefficients

嘛Lags不是模型属性。

利用this argument as a shortcut for specifying当非零MA系数对应于非连续滞后。例如,在滞后1和4处指定非零MA系数,例如

y t = ε t + θ 1 ε t - 1 + θ 4 ε t - 4 ,

specify'MALags',[1,4]

利用嘛Lags共同指定在非执行滞后处已知的非零MA系数。例如,如果在给定的MA(4)模型中 θ 1 = 0.5 θ 4 = 0.2 , specify'MA',{0.4,0.2},'MALags',[1,4]

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

  • Conditional variance process, σ t 2

  • To set equality constraints for σ ε 2 。例如,对于具有已知方差0.1的模型,请指定“方差”,0.1。By default,Variancehas valueNaN

  • To specify a conditional variance model, σ t 2 。Set'Variance'equal to a conditional variance model object, e.g., agarchmodel object.

Note

You cannot assign values to the propertiesPQ。对于非季节模型,

  • arimasetsPequal top+D

  • arimasetsQequal toq

Specify Multiplicative Models Using Name-Value Pairs

For a time series with periodicitys,德fine the degreepsseasonal AR operator polynomial, Φ ( L ) = ( 1 - Φ 1 L p 1 - - Φ p s L p s ) , 和the degreeqs季节性MA操作员多项式, Θ ( L ) = ( 1 + Θ 1 L q 1 + + Θ q s L q s ) 。同样,定义学位pnonseasonal AR operator polynomial, ϕ ( L ) = ( 1 - ϕ 1 L - - ϕ p L p ) , 和the degreeqnonseasonal MA operator polynomial,

θ ( L ) = ( 1 + θ 1 L + + θ q L q ) (3)

一个multiplicative ARIMA model with degreeDnonseasonal integration and degreesseasonality is given by

ϕ ( L ) Φ ( L ) ( 1 - L ) D ( 1 - L s ) y t = c + θ ( L ) Θ ( L ) ε t (4)
The innovation series can be an independent or dependent Gaussian or Student’stprocess. Thearima创新分布的默认值是具有恒定(标量)差异的IID高斯过程。

In addition to the arguments for specifying nonseasonal models (described in非季节Arima模型的名称值论点), you can specify these name-value arguments to create a multiplicativearima模型。You can extend an ARIMAX model similarly to include seasonal effects.

的名字-Value Arguments for Seasonal ARIMA Models

一个rgument 相应的模型术语Equation 4 When to Specify
SAR 季节性AR系数, Φ 1 , , Φ p s

为季节性AR系数设定平等限制。指定AR系数时,请使用与出现在Equation 4(也就是说,使用该系数的符号,因为它会出现在方程式的右侧)。

利用SARLagsto 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,...).

例如,指定模型

( 1 - 0.8 L ) ( 1 - 0.2 L 12 ) y t = ε t ,

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

您输入的任何系数值都必须对应于稳定的季节性AR多项式。

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

SARLags不是模型属性。

利用this argument when specifyingSAR指示非零季节性AR系数的滞后。

例如,指定模型

( 1 - ϕ L ) ( 1 - Φ 12 L 12 ) y t = ε t ,

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

SMA Seasonal MA coefficients, Θ 1 , , Θ q s

为季节性MA系数设定平等限制。

利用SMALagsto 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,...).

例如,指定模型

y t = ( 1 + 0.6 L ) ( 1 + 0.2 L 12 ) ε t ,

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

一个ny coefficient values you enter must correspond to an invertible seasonal MA polynomial.

SMALags 在观察到的序列的周期性中,对应于非零季节性MA系数的滞后

SMALags不是模型属性。

利用this argument when specifyingSMA指示非零季节性MA系数的滞后。

例如,指定模型

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

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

Seasonality Seasonal periodicity,s To specify the degree of seasonal integrations在季节性差分多项式Δs= 1 –Ls。For example, to specify the periodicity for seasonal integration of monthly data, specify'Seasonality',12
If you specify nonzeroSeasonality, then the degree of the whole seasonal differencing polynomial is one. By default,Seasonalityhas value0(意思是周期性,没有季节性整合)。

Note

You cannot assign values to the propertiesPQ。For multiplicative ARIMA models,

  • arimasetsPequal top+D+ps+s

  • arimasetsQequal toq+qs

Specify Conditional Mean Model Using Econometric Modeler App

您可以使用季节性和非季节条件模型的滞后结构和创新分布Econometric Modeler应用。该应用程序将所有系数视为unknown and estimable, including the degrees of freedom parameter for atinnovation distribution.

在命令行,打开Econometric Modeler应用程序。

计量经济学

一个lternatively, open the app from the apps gallery (seeEconometric Modeler).

在应用程序中,您可以通过选择用于响应的时间序列变量来查看金宝app所有受支持的模型时间序列pane. Then, on theEconometric Modeler标签,在Modelssection, click the arrow to display the models gallery.

The一个RMA/ARIMA Modelssection contains supported conditional mean models.

对于条件平均模型估计,Sarima和Sarimax是最灵活的模型。您可以创建任何有条件的平均模型,以通过单击来排除外源预测变量SARIMA, 或者you can create any conditional mean model that includes at least one exogenous predictor by clickingSARIMAX

一个fter you select a model, the app displays theType模型参数dialog box, whereType是模型类型。该图显示了Sarimax模型参数对话框。

对话框中的可调节参数取决于Type。In general, adjustable parameters include:

  • 一个model constant and linear regression coefficients corresponding to predictor variables

  • 时间序列组件参数,包括季节性和非季节滞后以及整合度

  • The innovation distribution

当您调整参数值时,Model Equationsection changes to match your specifications. Adjustable parameters correspond to input and name-value pair arguments described in the previous sections and in thearimareference page.

For more details on specifying models using the app, see将模型拟合到数据互动指定滞后运算符多项式

See Also

应用

Objects

Functions

Related Examples

More About