Filters time series by time-series models (synonym of TFILTER
).
Option
PRINT = string tokens |
What to print (series ); default * |
---|
Parameters
OLDSERIES = variates |
Time series to be filtered |
---|---|
NEWSERIES = variates |
To save filtered series |
FILTER = TSMs |
Models to filter with respect to |
ARIMA = TSMs |
ARIMA models for time series |
Description
FILTER
was renamed as TFILTER
in Release 14 to emphasize its status as a time-series command. The earlier name (FILTER
) was retained to allow previous programs to continue to run, but this may be removed in a future release.
Filtering is a means of processing a time series so as to produce a new series. The purpose is usually to reveal some features and remove other features of the original series. Filters in Genstat are one-sided: that is, each value in the new series depends only on present and past values of the original series. However, you can do two-sided filtering by using the SHIFT
and REVERSE
functions of CALCULATE
.
The OLDSERIES
and NEWSERIES
parameters of FILTER
specify respectively the time series to be filtered, and the series that result from filtering. A new series must not have the same identifier as the series from which it was calculated. Genstat interprets any missing values in the old series as zero. But if you use the ARIMA
parameter (see below), Genstat replaces them by interpolated values when it calculates the filtered series; the missing values remain in the old series.
The FILTER
parameter specifies the TSMs to be used for filtering. If the TSM is a transfer-function model, the new series yt is calculated from the old series xt by
yt = { ω(B)Bb / δ(B)∇d } xt.
The filter does not use the power transformation nor the reference constant. This lets you apply a single filter conveniently to a set of time series, for which different transformations and different constants might be appropriate. You can always use the CALCULATE
directive to apply a transformation to a series before using FILTER
.
If the TSM is an ARIMA model, then the new series at is calculated from the old series yt by
at = { φ(B)∇d / θ(B)} yt.
Note that the TSM does not have to be the model appropriate for yt. Again, Genstat ignores the parameters λ, c and σa2; you can set them to 1,0,0, for example.
The ARIMA
parameter specifies a time-series model for the old series. The purpose is to reduce transient errors that arise in the early part of the new series: these arise because Genstat does not know the values of the old series that came before those that have been supplied. If you do not use this parameter, then Genstat takes these earlier values to be zero. This can cause unacceptable transients which can only be partially removed by procedures such as mean-correcting the old series. If you do use the ARIMA
parameter, then Genstat uses the specified model to estimate (or back-forecast) the values of the old series earlier than those that have been supplied.
You do not have to have a good ARIMA model for the old series in order to achieve worthwhile reductions in the transients. Thus a model with orders (0,1,1) and parameters (1,0,0,0.7) would estimate the prior values to be constant, at a level that is a backward EWMA of the early values of the series.
For a seasonal monthly time series, an appropriate ARIMA model could have orders (0,1,1,0,1,1,12) and parameters (1,0,0,0.7,0.7). However you must give the supplied model a transformation parameter λ=1. Any other value for λ breaks the assumption of linearity that underlies the calculations for correcting the transients. The constant term in the ARIMA model can be non-zero, and should be if that is appropriate for the old series. Note that the ARIMA model does not define the filter.
If you specify the ARIMA
parameter, Genstat uses this model to interpolate any missing values in the old series before it calculates the new series. Suppose for example that the filter is the identity, defined by a transfer-function model with orders (0,0,0,0) and parameters (1,0,0); then the new series will be the old series with any missing values replaced.
Option: PRINT
.
Parameters: OLDSERIES
, NEWSERIES
, FILTER
, ARIMA
.
Action with RESTRICT
The OLDSERIES
variate can be restricted, but this must be to a contiguous set of units.
See also
Directive: TFILTER
.
Commands for: Time series.