The thresholdMin
level is similar to a sigma value for normally
distributed data. Hampel filter values above 6 indicate a data value that is
extremely unlikely to be part of a normal distribution (~ 1/500 million) and
therefore very likely to be an outlier. By choosing a relatively large value
for thresholdMin
we make it less likely that we will generate false
positives. False positives can include high frequency environmental noise.
With the default setting of fixedThreshold = TRUE
any value above the
threshold is considered an outlier and the selectivity
is ignored.
The selectivity
is a value between 0 and 1 and is used to generate an
appropriate threshold for outlier detection based on the statistics of the
incoming data. A lower value for selectivity
will result in more
outliers while a value closer to 1.0 will result in fewer. If
fixedThreshold=TRUE
, selectivity
may have a value of NA
.
When the user specifies fixedThreshold=FALSE
, the thresholdMin
and selectivity
parameters work like squelch and volume on a CB radio:
thresholdMin
sets a noise threshold below which you don't want anything
returned while selectivity
adjusts the number of points defined as
outliers by setting a new threshold defined by the maximum value of
roll_hampel
multiplied by selectivity
.
width
, the window width, is a parameter that is passed to
roll_hampel()
.