Description Usage Arguments Value See Also Examples
Generates from stlplus() output list components $Data and $time a ggplot facet_wrap output over time for "raw" (=original data), "seasonal", "trend" and "remainder" components.
1 |
data |
stlplus() output list. |
... |
Other arguments. |
plot object of mode 'plot
uts_stlplus_as_tibble and stlplus::stlplus
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | require(stlplus)
require(fpp3)
economics_tsbl <- ggplot2::economics %>%
mutate(Year_Month = yearmonth(date)) %>%
as_tsibble(index = Year_Month)
economics_tsbl %>% has_gaps() # check for time series gaps, fill with fill_gaps()
start_ts <- c(year(min(as.Date(economics_tsbl$Year_Month))),
month(min(as.Date(economics_tsbl$Year_Month))))
# convert to time-series object
economics_ts <- ts(economics_tsbl$uempmed, start = start_ts, frequency = 12)
# convert to tibble object
economics_stlplus <- stlplus(economics_ts, s.window = 27, t.window = 1201)
#
ggts_decomp(uts_stlplus_as_tibble(economics_stlplus))
economics_stlplus <- stlplus(economics_ts, s.window = "per", t.window = 1201)
ggts_decomp(uts_stlplus_as_tibble(economics_stlplus))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.