filter
Class: regARIMA
Filter disturbances through regression model with ARIMA errors
Syntax
[Y,E,U]
= filter(Mdl,Z)
[Y,E,U]
= filter(Mdl,Z,Name,Value)
Description
[
filters errors to produce responses, innovations, and unconditional disturbances of a univariate regression model with ARIMA time series errors.Y
,E
,U
]
= filter(Mdl
,Z
)
[
filters errors using additional options specified by one or more Y
,E
,U
]
= filter(Mdl
,Z
,Name,Value
)Name,Value
pair arguments.
Input Arguments

Regression model with ARIMA errors, specified as a model returned by The parameters of 

Errors that drive the innovation process, specified as a As a column vector, 
NameValue Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Namevalue arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.

Presample unconditional disturbances that provide initial values for the ARIMA error model, specified as the commaseparated pair consisting of
Default: 

Predictor data in the regression model, specified as the commaseparated pair consisting of The columns of Default: 

Presample errors providing initial values for the input error series,
Default: 
Notes
NaN
s inZ
,U0
,X
, andZ0
indicate missing values andfilter
removes them. The software merges the presample data sets (U0
andZ0
), then uses listwise deletion to remove anyNaN
s.filter
similarly removesNaN
s from the effective sample data (Z
andX
). RemovingNaN
s in the data reduces the sample size. Such removal can also create irregular time series.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 latest observation of each presample series occurs simultaneously.All predictor series (i.e. columns) in
X
are associated with each error series inZ
to producenumPaths
response seriesY
.
Output Arguments

Simulated responses, returned as a 

Simulated, mean 0 innovations of the ARIMA error model, returned as a 

Simulated unconditional disturbances, returned as a 
Examples
Alternatives
filter
generalizessimulate
. Both filter a series of errors to produce responses (Y
), innovations (E
), and unconditional disturbances (U
). However,simulate
autogenerates a series of mean zero, unit variance, independent and identically distributed (iid) errors according to the distribution inMdl
. In contrast,filter
requires that you specify your own errors, which can come from any distribution.
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] Davidson, R., and J. G. MacKinnon. Econometric Theory and Methods. Oxford, UK: Oxford University Press, 2004.
[3] Enders, W. Applied Econometric Time Series. Hoboken, NJ: John Wiley & Sons, Inc., 1995.
[4] Hamilton, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.
[5] Pankratz, A. Forecasting with Dynamic Regression Models. John Wiley & Sons, Inc., 1991.
[6] Tsay, R. S. Analysis of Financial Time Series. 2nd ed. Hoboken, NJ: John Wiley & Sons, Inc., 2005.