stlplus (version 0.5.1)

seasonal: Accessor functions for elements of an stl and stlplus object

Description

Retrieves the raw, seasonal, trend, remainder, or time components from an stlplus object. The methods seasonal.stl, ... also exist as a convenience for extracting components from R's stl().

Usage

seasonal(object)
trend(object)
remainder(object)
getraw(object)
"remainder"(object)
"fitted"(object, ...)
"predict"(object, ...)
"seasonal"(object)
"trend"(object)
fc(object, fcnum = 1)
"time"(x, ...)
"remainder"(object)
"seasonal"(object)
"trend"(object)
"time"(x, ...)
"predict"(object, ...)
"fitted"(object, ...)

Arguments

fcnum
number of post-trend smoothing frequency component.
x, object
object of class "stl" or "stlplus".
...
additional parameters

Value

Returns a vector of either the getraw time series, the seasonal, trend, or remainder components, or the time values of the time series. If times are requested but were not supplied in the initial stlplus call, the 1:n vector is returned, where n is the number of data points. The fitted method returns the sum of the seasonal and trend.

References

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.

See Also

stlplus

Examples

co2.stl <- stlplus(co2, t = as.vector(stats::time(co2)), n.p=12, l.window=13,
t.window=19, s.window=35, s.degree=1, sub.labels = substr(month.name, 1, 3))

plot(seasonal(co2.stl))