spec.taper(x, p=0.1)
0
and
0.5
giving the fraction of the data to be tapered
on each end of the series.
In the case of a multivariate time series,
p
can either be a scalar
or a vector with as many elements as columns in the series, each element
of the vector
p
gives the proportion of the data to be tapered
in the respective column.
x
containing the result of tapering the input
x
.
Values of the result that are inside the tapering window will be smaller in
absolute value than the corresponding values in the input.
Implements a split cosine bell taper. Let
p
be the portion to be tapered
at each end of the series by
n
the length of the series, then for
m=np
the split cosine bell taper is
Bloomfield, P. (1976).
Fourier Analysis of Time Series: An Introduction.
Wiley, New York.
The chapter "Analyzing Time Series" of the S-PLUS Guide to Statistical and Mathematical Analysis.
# taper 10% of each end of the housing start data hstaper <- spec.taper(hstart) hstart3 <- tsmatrix(hstart, hstart, hstart) # replicate hstart three times # taper 10%, 20% and 40% of each end hstaper3 <- spec.taper(hstart3, c(.1, .2, .4)) # the split-cosine-bell window for p=.25 tsplot(spec.taper(rep(1, 100), p=.25))