50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


ssMRCD (version 1.1.0)

local_outliers_ssMRCD: Local Outlier Detection Technique based on ssMRCD

Description

This function applies the local outlier detection method based on the spatially smoothed MRCD estimator developed in Puchhammer and Filzmoser (2023).

Usage

local_outliers_ssMRCD(
  data,
  coords,
  groups,
  lambda,
  weights = NULL,
  k = NULL,
  dist = NULL
)

Value

Returns an object of class "locOuts" with following components:

outliersindices of found outliers.
next_distancevector of next distances for all observations.
cutoffupper fence of adjusted boxplot (see adjbox) used as cutoff value for next distances.
coordsmatrix of observation coordinates.
datamatrix of observation values.
groupsvector of neighborhood assignments.
k, distspecifications regarding neighbor comparisons.
centersNcoordinates of centers of neighborhoods.
matneighbormatrix storing information which observations where used to calculate next distance for each observation (per row). 1 indicates it is used.
ssMRCDobject of class "ssMRCD" and output of ssMRCD covariance estimation.

Arguments

data

data matrix with measured values.

coords

matrix of coordinates of observations.

groups

vector of neighborhood assignments.

lambda

scalar used for spatial smoothing (see also ssMRCD).

weights

weight matrix used in ssMRCD.

k

integer, if given the k nearest neighbors per observations are used to calculate next distances. Default value is k = NULL.

dist

scalar, if given the neighbors closer than given distance are used for next distances. If dist is given, dist is used, otherwise k is used.

References

Puchhammer P. and Filzmoser P. (2023): Spatially smoothed robust covariance estimation for local outlier detection. tools:::Rd_expr_doi("10.48550/arXiv.2305.05371")

See Also

See also functions ssMRCD, plot.locOuts, summary.locOuts.

Examples

Run this code
# data construction
data = matrix(rnorm(2000), ncol = 4)
coords = matrix(rnorm(1000), ncol = 2)
groups = sample(1:10, 500, replace = TRUE)
lambda = 0.3

# apply function
outs = local_outliers_ssMRCD(data = data,
                             coords = coords,
                             groups = groups,
                             lambda = lambda,
                             k = 10)
outs

Run the code above in your browser using DataLab