This function estimates the seasonal period of a time series via a GAM model. The data series with the seasonal period removed is then returned.
removeSeasonalPeriod(x, period, time = 1:length(x))The time series to be analyzed.
The period of the seasonality of the data.
If not provided, then the observations are assumed to occur at integer times 1, 2, ..., length(x). Otherwise, the time vector may specify when these observations occur.
Returns a vector of data with the seasonality component removed.