tidiers_HoltWinters: Tidying methods for HoltWinters modeling of time series

Description Usage Arguments Value See Also Examples

Description

These methods tidy HoltWinters models of univariate time series.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'HoltWinters'
sw_tidy(x, ...)

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

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

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

Arguments

x

An object of class "HoltWinters"

...

Additional parameters (not used)

data

Used with sw_augment only. NULL by default which simply returns augmented columns only. User can supply the original data, which returns the data + augmented columns.

rename_index

Used with sw_augment only. A string representing the name of the index generated.

timetk_idx

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

Value

sw_tidy() returns one row for each model parameter, with two columns:

sw_glance() returns one row with the following columns:

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

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

See Also

HoltWinters()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(dplyr)
library(forecast)
library(sweep)

fit_hw <- USAccDeaths %>%
    stats::HoltWinters()

sw_tidy(fit_hw)
sw_glance(fit_hw)
sw_augment(fit_hw)
sw_tidy_decomp(fit_hw)

sweep documentation built on July 10, 2020, 5:13 p.m.