Multivariate L1 Median
Computes the multivariate L1 median (also called spatial median) of a data matrix X
.
l1median_NM (X, maxit = 200, tol = 10^-8, trace = 0, m.init = .colMedians (X), ...) l1median_CG (X, maxit = 200, tol = 10^-8, trace = 0, m.init = .colMedians (X), ...) l1median_BFGS (X, maxit = 200, tol = 10^-8, trace = 0, m.init = .colMedians (X), REPORT = 10, ...) l1median_NLM (X, maxit = 200, tol = 10^-8, trace = 0, m.init = .colMedians (X), ...) l1median_HoCr (X, maxit = 200, tol = 10^-8, zero.tol = 1e-15, trace = 0, m.init = .colMedians (X), ...) l1median_VaZh (X, maxit = 200, tol = 10^-8, zero.tol = 1e-15, trace = 0, m.init = .colMedians (X), ...)
X |
a matrix of dimension |
maxit |
The maximum number of iterations to be performed. |
tol |
The convergence tolerance. |
trace |
The tracing level. Set |
m.init |
A vector of length |
REPORT |
A parameter internally passed to |
zero.tol |
The zero-tolerance level used in |
... |
Further parameters passed from other functions. |
par |
A vector of length |
value |
The value of the objective function |
code |
The return code of the optimization algorithm. See |
iterations |
The number of iterations performed. |
iterations_gr |
When using a gradient function this value holds the number of times the gradient had to be computed. |
time |
The algorithms runtime in milliseconds. |
See the vignette "Compiling pcaPP for Matlab" which comes with this package to compile and use some of these functions in Matlab.
Heinrich Fritz, Peter Filzmoser <P.Filzmoser@tuwien.ac.at>
# 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_NM (x)$par l1median_CG (x)$par l1median_BFGS (x)$par l1median_NLM (x)$par l1median_HoCr (x)$par l1median_VaZh (x)$par # compare with coordinate-wise median: apply(x,2,median)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.