tidiers_stl {sweep}R Documentation

Tidying methods for STL (Seasonal, Trend, Level) decomposition of time series

Description

Tidying methods for STL (Seasonal, Trend, Level) decomposition of time series

Usage

## S3 method for class 'stl'
sw_tidy(x, ...)

## S3 method for class 'stl'
sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)

## S3 method for class 'stlm'
sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)

## S3 method for class 'stlm'
sw_glance(x, ...)

## S3 method for class 'stlm'
sw_augment(x, data = NULL, rename_index = "index", timetk_idx = FALSE, ...)

Arguments

x

An object of class "stl"

...

Not used.

timetk_idx

Used with sw_tidy_decomp. When TRUE, uses a timetk index (irregular, typically date or datetime) if present.

rename_index

Used with sw_tidy_decomp. A string representing the name of the index generated.

data

Used with sw_augment only.

Value

sw_tidy() wraps sw_tidy_decomp()

sw_tidy_decomp() returns a tibble with the following time series attributes:

sw_glance() returns the underlying ETS or ARIMA model's sw_glance() results one row with the columns

sw_augment() returns a tibble with the following time series attributes:

See Also

stl()

Examples

library(dplyr)
library(forecast)
library(sweep)

fit_stl <- USAccDeaths %>%
    stl(s.window = "periodic")

sw_tidy_decomp(fit_stl)


[Package sweep version 0.2.5 Index]