Learn R Programming

alphaOutlier (version 1.2.0)

aout.kernel: Find $\alpha$-outliers in arbitrary univariate data using kernel density estimation

Description

Given the arguments of the density, aout.kernel identifies $\alpha$-outliers in a given data set.

Usage

aout.kernel(data, alpha, plot = TRUE, plottitle = "", kernel = "gaussian", nkernel = 1024, kern.bw = "SJ", kern.adj = 1, xlim = NA, ylim = NA, outints = FALSE, w = NA, ...)

Arguments

data
a vector. The data set to be examined.
alpha
an atomic vector. Determines the maximum amount of probability mass the outlier region may contain.
plot
boolean. If TRUE, a plot of the data and estimated density with shaded outlier region is printed.
plottitle
character string. Title of the plot.
kernel
See kernel in density.
nkernel
See n in density.
kern.bw
See bw in density.
kern.adj
See adjust in density.
xlim
a vector. Specify if you want to change the x-limits of the plot.
ylim
a vector. Specify if you want to change the y-limits of the plot.
outints
boolean. If TRUE, then the bounds of the inlier-regions and the chosen bandwidth are shown.
w
a vector. See weights in density.
...
Further arguments for density and plot.

Value

If outints = TRUE, a list of , a list of

Examples

Run this code
set.seed(23)
tempx <- rnorm(1000, 0, 1)
tempx[1] <- -2.5
aout.kernel(tempx[1:10], alpha = 0.1, kern.adj = 1, xlim = c(-3,3), outints = TRUE)
# not run:
# aout.kernel(tempx[1:200], alpha = 0.1, kern.adj = 1, xlim = c(-3,3))

Run the code above in your browser using DataLab