I'm detecting outliers in a periodic time series constructed as so:
install.packages("outliers")
time_series_obj = ts(time_series_data, frequency = SOME_VALUE)
fitted_time_series_data <- stl(time_series_obj, "periodic", robust=TRUE)
outliers <- which(fitted_time_series_data$weights<1e-8)
The outlier detection is too sensitive for my needs, and I only want to keep the most extreme outliers. (Changing the weight filter has very little effect.) I would like the sensitivity to be configurable (e.g. filter out all outliers with a remainder that has an absolute value greater than k standard deviations or some similar approach).