plot.epplabOutlier: Plot for an epplabOutlier Object

View source: R/plot.epplabOutlier.R

plot.epplabOutlierR Documentation

Plot for an epplabOutlier Object

Description

Visualizes which observations are considered as outliers and how often for an epplabOutlier object.

Usage

## S3 method for class 'epplabOutlier'
plot(x, col = c("white", "black"), outlier = TRUE,
  xlab = "", ylab = "", ...)

Arguments

x

Object of class epplabOutlier.

col

Which colors should be used for non-outliers and outliers. Default is white and black.

outlier

Logical if only observations considered as outliers at least once should be plotted or all. Default is TRUE. xlab Possible x axis label. Default is none. ylab Possible x axis label. Default is none.

xlab

Sets the x-axis label.

ylab

Sets the y-axis label.

...

Graphical parameters passed on to image.

Author(s)

Daniel Fischer and Klaus Nordhausen

See Also

EPPlabOutlier, image

Examples


# creating data with 3 outliers
n <-300 
p <- 10
X <- matrix(rnorm(n*p),ncol=p)
X[1,1] <- 9
X[2,4] <- 7 
X[3,6] <- 8
# giving the data rownames, obs.1, obs.2 and obs.3 are the outliers.
rownames(X) <- paste("obs",1:n,sep=".")

PP<-EPPlab(X,PPalg="PSO",PPindex="KurtosisMax",n.simu=20, maxiter=20)
OUT<-EPPlabOutlier(PP, k = 3, location = median, scale = mad)
plot(OUT)


fischuu/REPPlab documentation built on April 19, 2023, 9:52 a.m.