filter
Filter disturbances using ARIMA or ARIMAX model
Syntax
[Y,E,V]
= filter(Mdl,Z)
[Y,E,V]
= filter(Mdl,Z,Name,Value)
Description
[
filters disturbances, Y
,E
,V
]
= filter(Mdl
,Z
)Z
, to produce responses, innovations, and conditional variances of a univariate ARIMA(p,D,q) model.
[
filters disturbances using additional options specified by one or more Y
,E
,V
]
= filter(Mdl
,Z
,Name,Value
)Name,Value
pair arguments.
Input Arguments

ARIMA model, as created by 

$${\epsilon}_{t}={\sigma}_{t}{z}_{t}.$$ As a column vector, Note

NameValue Arguments
Specify optional
commaseparated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.

Positive presample conditional variances that provide initial values for the model. If
Default: 

Matrix of predictor data corresponding to a regression component in the conditional mean model. The columns of Default: 

Presample response data, providing initial values for the model. If
Default: 

Presample disturbances, providing initial values for the input disturbance series,
Default: 
Notes
NaN
s in the data indicate missing values andfilter
removes them. The software merges the presample data and main data sets separately, then uses listwise deletion to remove anyNaN
s. That is,filter
setsPreSample
=[Y0 Z0 V0]
andData
=[Z X]
, then it removes any row inPreSample
orData
that contains at least oneNaN
.Removing
NaN
s in the main data reduces the effective sample size. Such removal can also create irregular time series.filter
assumes that you synchronize presample data such that the most recent observation of each presample series occurs simultaneously.All predictor series in
X
(i.e., columns ofX
) are applied to each disturbance series inZ
to produceNumPaths
response seriesY
.
Output Arguments






Examples
Alternatives
filter
generalizessimulate
. That is, both filter a series of disturbances to produce output responses, innovations, and conditional variances. However,simulate
autogenerates a series of mean zero, unit variance, independent and identically distributed (iid) disturbances according to the distribution inMdl
. In contrast,filter
lets you directly specify your own disturbances.
References
[1] Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. Time Series Analysis: Forecasting and Control 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.
[2] Enders, W. Applied Econometric Time Series. Hoboken, NJ: John Wiley & Sons, 1995.
[3] Hamilton, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.