l1median {pcaPP}R Documentation

Multivariate L1 Median

Description

Computes the multivariate L1 median (also called spatial median) of a data matrix.

Usage

l1median(X, MaxStep = 200, ItTol = 10^-8)

Arguments

X a matrix containing the values whose multivariate L1 median is to be computed.
MaxStep Maximal number of step-halvings.
ItTol Tolerance for convergence of the algorithm.

Value

returns the vector of the coordinates of the L1 median.

Author(s)

Heinrich Fritz, Peter Filzmoser <P.Filzmoser@tuwien.ac.at>

References

C. Croux, P. Filzmoser, M. Oliveira, (2007). Algorithms for Projection-Pursuit Robust Principal Component Analysis, Chemometrics and Intelligent Laboratory Systems, Vol. 87, pp. 218-225.

See Also

median

Examples

  l1median(rnorm(100)) # this returns the median of the sample

  # multivariate data with outliers
  library(mvtnorm)
  x <- rbind(rmvnorm(200, rep(0, 4), diag(c(1, 1, 2, 2))), 
             rmvnorm( 50, rep(3, 4), diag(rep(2, 4))))
  l1median(x)
  # compare with coordinate-wise median:
  apply(x,2,median)

[Package pcaPP version 1.6 Index]