check_outlier: Validation by outlier

Description Usage Arguments Details References See Also

Description

Validates timeseries data by detecting outliers. The output is an xts-object with logical values. Outliers are set to FALSE, non-outliers to TRUE.

Usage

1
2
check_outlier(xts, sigma_multiplier = 3, moving_window = TRUE, width,
  type = c("mean", "median"), verbose = TRUE)

Arguments

xts

An xts object to be validated.

sigma_multiplier

The factor the standard deviation of all values is mulitplied with.

moving_window

logical. Controls the way the anomaly criteria is calculated. If set to TRUE, both mean and standard deviation are computed on moving windows (i.e. "rolling mean" and "rolling sd"). In contrast, if set to FALSE, the overall mean and the overall standard deviation of the given time series is used. This consequently leads to a static anomaly criteria.

width

An integer specifying the window width.

type

Either "mean" or "median". Determines the computation of the reference values.

verbose

logical. Provide additional details?

Details

The distinction whether a data point is an outlier or not is performed by defining an anomaly criteria. This reflects the standard deviation (sd) of data points multiplied by a factor (sigma_multiplier, default=3). The sd is calculated either for all data points or for moving windows. If the absolute difference of a data point and the (rolling) mean of data points is higher than the anomaly criteria, the value is considered to be an outlier.

References

DWA (2011). Merkblatt DWA-M 181 - Messung von Wasserstand und Durchfluss in Entwaesserungssystemen. Hennef.

See Also

xts, rollapply.


dleutnant/m181 documentation built on May 15, 2019, 9:16 a.m.