Last chance! 50% off unlimited learning
Sale ends in
This function applies the local outlier detection method based on the spatially smoothed MRCD estimator developed in Puchhammer and Filzmoser (2023).
local_outliers_ssMRCD(
data,
coords,
groups,
lambda,
weights = NULL,
k = NULL,
dist = NULL
)
Returns an object of class "locOuts"
with following components:
outliers | indices of found outliers. |
next_distance | vector of next distances for all observations. |
cutoff | upper fence of adjusted boxplot (see adjbox ) used as cutoff value for next distances. |
coords | matrix of observation coordinates. |
data | matrix of observation values. |
groups | vector of neighborhood assignments. |
k, dist | specifications regarding neighbor comparisons. |
centersN | coordinates of centers of neighborhoods. |
matneighbor | matrix storing information which observations where used to calculate next distance for each observation (per row). 1 indicates it is used. |
ssMRCD | object of class "ssMRCD" and output of ssMRCD covariance estimation. |
data matrix with measured values.
matrix of coordinates of observations.
vector of neighborhood assignments.
scalar used for spatial smoothing (see also ssMRCD
).
weight matrix used in ssMRCD
.
integer, if given the k
nearest neighbors per observations are used to calculate next distances. Default value is k = NULL
.
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.
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 functions ssMRCD, plot.locOuts, summary.locOuts
.
# 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