local_outliers_ssMRCD {ssMRCD} | R Documentation |
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,
N_assignments,
lambda,
weights = NULL,
k = NULL,
dist = NULL
)
Arguments
data |
data matrix with measured values. |
coords |
matrix of coordinates of observations. |
N_assignments |
vector of neighborhood assignments. |
lambda |
scalar used for spatial smoothing (see also |
weights |
weight matrix used in |
k |
integer, if given the |
dist |
scalar, if given the neighbors closer than given distance are used for next distances. If |
Value
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. |
N_assignments | 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. |
References
Puchhammer P. and Filzmoser P. (2023): Spatially smoothed robust covariance estimation for local outlier detection. doi:10.48550/arXiv.2305.05371
See Also
See also functions ssMRCD, plot.locOuts, summary.locOuts
.
Examples
# data construction
data = matrix(rnorm(2000), ncol = 4)
coords = matrix(rnorm(1000), ncol = 2)
N_assignments = sample(1:10, 500, replace = TRUE)
lambda = 0.3
# apply function
outs = local_outliers_ssMRCD(data = data,
coords = coords,
N_assignments = N_assignments,
lambda = lambda,
k = 10)
outs