This function calculates a certain statistic in centered sliding windows along a time series. The available statistics are: minimum, first quartile,median, mean, third quartile, maximum and standard deviation. Incomplete windows can be assigned NA (option tailsTS = FALSE); alternatively, the statistic can be calculated with the available values.
getRollStatistics(selTs, selTsName, slidingWin, tailsTS = FALSE, selStatisTF)
The input time series
The input time series name
The sliding window size
The action regarding the tails (TRUE or FALSE)
A data frame containing seven columns. Each column corresponds to a statistic. When the user selects a statistic, its value is TRUE; otherwise, it is FALSE.
For each selected statistic, the function creates a time series in the environment susEnv (for example, a time series of mean values).