seas_adj | R Documentation |
seas_adj
takes a tibble of
time series and returns a tibble with seasonal adjusted values.
seas_adj(series, freq = "month", log.trafo = F, method = "arima")
series |
The input tibble in tidy
form with columns |
log.trafo |
Logical, indicates if value should be transformed to log(value). |
method |
Character, which method for adjustment should be choosen. See Details. |
Returns a tibble with seasonal adjusted values and a date column.
For method, there can be choosen "firstdiff"
and "arima"
.
If "firstdiff"
, first derivatives with lag = 1
are computed.
If "arima"
, the X-13ARIMA-SEATS procedure is used
(performed by seasonal::seas()
from the seasonal package).
series <- trendecon::ts_gtrends(c("ikea", "saturn"), time = "2020-01-01 2021-06-01") gtseas_adj(series, freq = "month", log.traf = TRUE, method = "firstdiff")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.