ics.distances: Squared ICS Distances for Invariant Coordinates

View source: R/ics.distances.R

ics.distancesR Documentation

Squared ICS Distances for Invariant Coordinates

Description

Computes the squared ICS distances, defined as the Euclidian distances of the selected centered components.

Usage

ics.distances(object, index = NULL)

Arguments

object

object of class ics2 where both S1 and S2 are specified as functions.

index

vector of integers indicating the indices of the components to select.

Details

For outlier detection, the squared ICS distances can be used as a measure of outlierness. Denote as Z the invariant coordinates centered with the location estimate specified in S1 (for details see ics2). Let Z_k be the k components of Z selected by index, then the ICS distance of the observation i is defined as:

ICSD^2(x_i,k) = || Z_k||^2.

Note that if all components are selected, the ICS distances are equivalent to the Mahlanobis distances computed with respect of the first scatter and associated location specified in S1.

Value

A numeric vector containing the squared ICS distances.

Note

Function ics.distances() reached the end of its lifecycle, please use ics_distances instead. In future versions, ics_distances() will be deprecated and eventually removed.

Author(s)

Aurore Archimbaud and Klaus Nordhausen

References

Archimbaud, A., Nordhausen, K. and Ruiz-Gazen, A. (2018), ICS for multivariate outlier detection with application to quality control. Computational Statistics & Data Analysis, 128:184-199. ISSN 0167-9473. <https://doi.org/10.1016/j.csda.2018.06.011>.

See Also

ics2, mahalanobis

Examples

Z <- rmvnorm(1000, rep(0, 6))
Z[1:20, 1] <- Z[1:20, 1] + 5
A <- matrix(rnorm(36), ncol = 6)
X <- tcrossprod(Z, A)

pairs(X)
icsX <- ics2(X)

icsX.dist.all <- ics.distances(icsX, index = 1:6)
maha <- mahalanobis(X, center = colMeans(X), cov = cov(X))
# in this case the distances should be the same
plot(icsX.dist.all, maha)
all.equal(icsX.dist.all, maha)

icsX.dist.first <- ics.distances(icsX, index = 1)
plot(icsX.dist.first)




ICSOutlier documentation built on May 29, 2024, 2:08 a.m.