Description Usage Arguments Value Note Author(s) References See Also Examples
Calculates the frequency response function for the seasonal, trend, and high-pass filters of an STL decomposition at a specified grid of fourier frequencies for the symmetric smoothing case. This can be used to visualize the power transfer function or phase shift function to evaluate the spectral properties of an STL model.
1 2 3 4 5 6 7 8 9 10 |
n.p,
s.window,
s.degree,
t.window,
t.degree,
l.window,
l.degree,
periodic |
STL parameters (see |
x |
object of class |
M |
density of the grid of fourier frequencies, which range from 0 to 0.5. |
... |
A data frame of class "freqr"
consisting of frequencies fk
and frequency response values frfv
.
To investigate the spectral properties of an STL model at an asymmetric smoothing location, one can use the freqrlo
function with a "stlop"
object to obtain the frequency response function at any smoothing point.
Ryan Hafen
R. B. Cleveland, W. S. Cleveland, J. E. McRae, and I. Terpenning (1990) STL: A Seasonal-Trend Decomposition Procedure Based on Loess. Journal of Official Statistics, 6, 3-73.
R. Shumway and D. Stoffer. Time series analysis and its applications. Springer Verlag, 2000.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | co2.stl <- stl2(co2, t=as.vector(time(co2)), n.p=12,
s.window=35, s.degree=1, t.degree=1,
s.blend=0.5, t.blend=0.5)
co2op <- stlOp(co2.stl)
# symmetric filter
co2fr <- freqr(co2op, M=1000)
# seasonal, trend, and overall filter at endpoint
co2fr1 <- freqrlo(co2op$fit, at=1, M=800)
co2fr1.s <- freqrlo(co2op$seas, at=1)
co2fr1.t <- freqrlo(co2op$trend, at=1)
# overall filter at 10 points from end and middle
co2fr10 <- freqrlo(co2op$fit, at=10, M=800)
co2frm <- freqrlo(co2op$fit, at=234, M=800)
plot(co2fr, aspect=0.25)
plot(co2fr1, aspect=0.25)
plot(co2fr1.s, aspect=0.25)
plot(co2fr1.t, aspect=0.25)
plot(co2frm, aspect=0.25)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.