Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Filter disturbances through vector autoregression (VAR) model

`Y = filter(Mdl,Z)`

`Y = filter(Mdl,Z,Name,Value)`

```
[Y,E] =
filter(___)
```

uses additional
options specified by one or more `Y`

= filter(`Mdl`

,`Z`

,`Name,Value`

)`Name,Value`

pair arguments. For example, you can specify exogenous predictor data or whether to
scale the disturbances by the lower triangular Cholesky factor of the model
innovations covariance matrix.

`filter`

computes`Y`

and`E`

using this process for each pagein`j`

`Z`

.If

`Scale`

is`true`

, then`E(:,:,`

=)`j`

`L*Z(:,:,`

, where)`j`

`L`

=`chol(Mdl.Covariance,'lower')`

. Otherwise,`E(:,:,`

=)`j`

`Z(:,:,`

. Set)`j`

*e*=_{t}`E(:,:,`

.)`j`

`Y(:,:,`

is)`j`

*y*in this system of equations._{t}For variable definitions, see Definitions.$${y}_{t}={\widehat{\Phi}}^{-1}(L)\left(\widehat{c}+\widehat{\delta}t+{e}_{t}\right).$$

`filter`

generalizes`simulate`

. Both functions filter disturbance series through a model to produce response and innovations series. However, whereas`simulate`

generates a series of mean-zero, unit-variance, independent Gaussian disturbances`Z`

to form innovations`E`

=`L*Z`

,`filter`

enables you to supply disturbances from any distribution.`filter`

uses this process to determine the time origin*t*_{0}of models that include linear time trends.If you do not specify

`Y0`

, then*t*_{0}= 0.Otherwise,

`filter`

sets*t*_{0}to`size(Y0,1)`

–`Mdl.P`

. Therefore, the times in the trend component are*t*=*t*_{0}+ 1,*t*_{0}+ 2,...,*t*_{0}+`numobs`

, where`numobs`

is the effective sample size (`size(Y,1)`

after`filter`

removes missing values). This convention is consistent with the default behavior of model estimation in which`estimate`

removes the first`Mdl.P`

responses, reducing the effective sample size. Although`filter`

explicitly uses the first`Mdl.P`

presample responses in`Y0`

to initialize the model, the total number of observations in`Y0`

and`Y`

(excluding missing values) determines*t*_{0}.

[1]
Hamilton, J. D. *Time Series Analysis*. Princeton, NJ: Princeton University Press, 1994.

[2]
Johansen, S. *Likelihood-Based Inference in Cointegrated Vector Autoregressive Models*. Oxford: Oxford University Press, 1995.

[3]
Juselius, K. *The Cointegrated VAR Model*. Oxford: Oxford University Press, 2006.

[4] Lütkepohl, H. *New Introduction to Multiple
Time Series Analysis*. Berlin: Springer, 2005.

Was this topic helpful?