Filters a time series before spectral analysis (A.W.A. Murray).
Option
PHI = scalar |
Specifies the value of the parameter used in filtering; default 0.99 |
---|
Parameters
SERIES = variates |
Input series |
---|---|
FILTERED = variates |
Output series |
Description
PREWHITEN
provides filtering of time series data prior to spectral analysis. Parameters SERIES
and FILTERED
specify the input and output series, respectively. The filtered series y is given by
yt = xt – φ × xt-1
where x is the input series. (Thus φ = 1 would give first differencing.) The value of φ is specified by the PHI
option; the default value of φ=0.99 is often suitable. Alternatively, an empirical approach is to use the value
φ = (1 – 1/L)
where L is the lag at which inspection suggests that the autocorrelation in the series becomes negligible.
To “recolour” the spectrum of the series after estimation, you can multiply by
1/((1 + φ2) – (2×φ×cos(2π×f)))
where f is the frequency at which the spectrum is estimated.
Option: PHI
.
Parameters: SERIES
, FILTERED
.
Method
The procedure uses the TFILTER
directive with two TSMs defined as follows:
TSM filter; ORDER=!(1,0,0); PARAM=!(1,0,0,PHI)
TSM arima; ORDER=!(0,1,0); PARAM=!(1,0,0)
TFILTER SERIES; NEWSERIES=FILTERED; FILTER=filter; ARIMA=arima
The procedure is based on ideas from Granville Tunnicliffe Wilson, University of Lancaster.
Action with RESTRICT
The behaviour is as for the TFILTER
directive.
See also
Directive: FOURIER
.
Procedures: DFOURIER
, MCROSSPECTRUM
, PERIODTEST
, REPPERIODOGRAM
, SMOOTHSPECTRUM
.
Commands for: Time series.
Example
CAPTION 'PREWHITEN example',\ 'Data are from the Genstat 5 Release 1 Reference Manual page 544.';\ STYLE=meta,plain VARIATE [NVALUE=26] Auto READ Auto 1.00000000 0.75529144 0.51519220 0.20418942 0.09391165 -0.00993248 -0.03836911 -0.05863828 -0.01256090 0.01050724 -0.03169708 -0.11680566 -0.19236910 -0.21314260 -0.21102816 -0.13031514 -0.05516818 0.05541264 0.09524165 0.11746112 0.08982970 0.08212313 0.04734724 -0.00584709 -0.06916435 -0.10306836 : PREWHITEN [PHI=0.98] SERIES=Auto; FILTERED=wAuto PRINT Auto,wAuto