find_seasonalities | R Documentation |
Get seasonalities in a time series by iterative spectral density estimation
find_seasonalities(y, max_iter = 5, aggregator = sum, upper_limit = 1500)
y |
The time series to detect seasonality in - a numeric vector. |
max_iter |
The maximal number of iterations - of the spectral density decomposition and aggregation cycles |
aggregator |
How seasonalities are aggregated - by default **sum**. |
upper_limit |
The highest possible seasonality to be found in a time series - by default 1500. |
This algorithm computes the spectral density of a time series y, using an AR process
A vector of seasonalities.
[stats::spec.ar()]. If this returns a period longer than 1, the time series is aggregated, using the previous period as an aggregation window. This is done by applying a function to slices of the time series (by default, the **sum**). Then the first step is repeated with the new, shorter time series. This is repeated until either no seasonality is found, **max_ter** iterations of the algorithm have been carried out, or the **upper_limit** for period length is reached. None that the upper limit is relatively liberal, and should not be reached until you have minute (or smaller) samples of the data, multiple seasonalities, and years of data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.