L1median {robustX} | R Documentation |
Compute the multivariate L1-median m, i.e., the minimizer of
sum(i = 1:n; || x[i] - m ||),
where || u || = sqrt(sum(j = 1:p; u[j]^2)).
As a convex problem, there's always a global minimizer, computable not by a closed formula but rather an iterative search. As the (partial) first derivatives of the objective function is undefined the data points, the minimization is not entirely trivial.
L1median(X, m.init = apply(X, 2, median), weights = NULL, method = c("nlm", "HoCrJo", "VardiZhang", optimMethods, nlminbMethods), pscale = apply(abs(centr(X, m.init)), 2, mean, trim = 0.40), tol = 1e-08, maxit = 200, trace = FALSE, zero.tol = 1e-15, ...)
X |
numeric matrix of dimension n x p,
say. |
m.init |
starting value for m; typically and by default the coordinatewise median. |
weights |
optional numeric vector of non-negative weights;
currently only implemented for method "VardiZhang" . |
method |
character string specifying the computational method, i.e., the algorithm to be used (can be abbreviated). |
pscale |
numeric p-vector of positive numbers, the coordinate-wise scale (typical size of delta(m[j])), where m is the problem's solution. |
tol |
positive number specifying the (relative) convergence tolerance. |
maxit |
positive integer specifying the maximal number of iterations (before the iterations are stopped prematurely if necessary). |
trace |
an integer specifying the tracing level of the
iterations; 0 does no tracing |
zero.tol |
for method "VardiZhang" , a small positive
number specifying the tolerance for determining that the iteration
is ‘exactly’ at a data point (which is singularity). |
... |
optional arguments to nlm() or the
control (list) arguments of optim() , or
nlminb() , respectively. |
Currently, we have to refer to the “References” below.
currently the result depends strongly on the method
used.
FIXME. This will change considerably.
Martin Maechler. Method "HoCrJo"
is mostly based on Kristel
Joossens' function, implementing Hossjer and Croux (1995).
Hossjer and Croux, C. (1995). Generalizing Univariate Signed Rank Statistics for Testing and Estimating a Multivariate Location Parameter. Non-parametric Statistics 4, 293–308.
Vardi, Y. and Zhang, C.-H. (2000). The multivariate L_1-median and associated data depth. Proc. National Academy of Science 97(4), 1423–1426.
data(stackloss) L1median(stackloss) L1median(stackloss, method = "HoCrJo")