Description Usage Arguments Value Note Author(s) References See Also Examples
Retrieves the raw, seasonal, trend, remainder, or time components from an stl2 object. The methods seasonal.stl
, ... also exist as a convenience for extracting components from R's stl()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | getraw(object)
## S3 method for class 'stl2'
seasonal(object)
## S3 method for class 'stl2'
trend(object)
## S3 method for class 'stl2'
remainder(object)
## S3 method for class 'stl2'
fitted(object, ...)
## S3 method for class 'stl2'
time(x, ...)
fc(object, fcnum=1)
## S3 method for class 'stl'
seasonal(object)
## S3 method for class 'stl'
trend(object)
## S3 method for class 'stl'
remainder(object)
## S3 method for class 'stl'
fitted(object, ...)
## S3 method for class 'stl'
time(x, ...)
|
x, object |
object of class |
fcnum |
number of post-trend smoothing frequency component. |
... |
Returns a vector of either the getraw
time series, the seasonal
, trend
, or remainder
components, or the time
values of the time series. If time
s are requested but were not supplied in the initial stl2
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.
The fitted
and predict
methods are equivalent. For objects of class "stl2"
, these functions return the sum of all components but the remainder, including post-trend smoothing components. Note also that the trend
method for objects of class "stl2"
only returns the trend component from the STL iterations, even when post-trend smoothing is done.
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.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.