Description Usage Arguments Details Value Author(s) Examples
Function that helps to define the seasonality (periodicity) of the time-series.
1 | defineSeasons(tm, y, frequency = "daily", plot = TRUE)
|
tm |
the time (date; as a POSIXlt or POSIXct class object) of the observation |
y |
the observations |
frequency |
the frequency of the observations; so far either 'daily', 'weekly' or 'monthly'. |
plot |
logical, if TRUE a plot will be produced. |
Based on time-series analysis, this function first decomposes the data into the following components; seasonal, trend and remainder. Next, the periodicity of the time-series will be defined by using a cosine function fitted to the seasonal component (using least-square). The minima of the cosine curve can then be used to separate the periods (nessesary in other functions of the DOSeasons package).
A data frame with 7 variables:
teh date of the time-series observations
the data
the number of the period
the seasonal component
the trend component
the remainder component
the best fit of the cosine function
Simeon Lisovski
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.