plot.KRDetect: Outlier detection plot

Description Usage Arguments Details Examples

View source: R/generalFunctions.R

Description

Plot of results obtained using functions KRDetect.outliers.changepoint, KRDetect.outliers.controlchart and KRDetect.outliers.EV for identification of outliers. The function graphically visualizes results obtained using functions for outlier detection implemented in package envoutliers.

Usage

1
2
3
## S3 method for class 'KRDetect'
plot(x, show.segments = TRUE, plot.type = "all",
  xlab = "index", ylab = "data values", ...)

Arguments

x

a KRDetect object obtained as an output of function KRDetect.outliers.changepoint, KRDetect.outliers.controlchart or KRDetect.outliers.EV for identification of outliers.

show.segments

a logical variable specifying if vertical lines representing individual segments are plotted. Only required for results obtained using KRDetect.outliers.changepoint function.

plot.type

a type of plot with outliers displayed.

Possible options for KRDetect.outliers.controlchart are

  • "all" to show outliers detected using control chart x, R and s

  • "x" to show outliers detected using control chart x

  • "R" to show outliers detected using control chart R

  • "s" to show outliers detected using control chart s

Possible options for KRDetect.outliers.EV are

  • "all" to show outliers with both extremely low and high value

  • "min" to show outliers with extremely low value

  • "max" to show outliers with extremely high value

xlab

a title for the x axis

ylab

a title for the y axis

...

further arguments to be passed to the plot function.

Details

This function plots the results obtained using function KRDetect.outliers.changepoint, KRDetect.outliers.controlchart or KRDetect.outliers.EV implemented in package envoutliers and identificating outliers.

Examples

1
2
3
4
data("mydata", package = "openair")
x = mydata$o3[format(mydata$date, "%m %Y") == "12 2002"]
result = KRDetect.outliers.EV(x)
plot(result)

envoutliers documentation built on July 2, 2020, 3:25 a.m.