HR.Mest {ICSNP} | R Documentation |
iterative algorithm that finds the affine equivariant multivariate median by estimating tyler.shape
simultaneously.
HR.Mest(X, maxiter = 100, eps.scale = 1e-06, eps.center = 1e-06, na.action = na.fail)
X |
a numeric data frame or matrix. |
maxiter |
maximum number of iterations. |
eps.scale |
convergence tolerance for the Tyler's shape matrix subroutine. |
eps.center |
convergence tolerance for the location estimate. |
na.action |
a function which indicates what should happen when the data contain 'NA's. Default is to fail. |
The algorithm follows the idea of Hettmansperger and Randles (2002). There are, however, some differences. This algorithm has the vector of marginal medians as starting point for the location and the starting shape matrix is Tyler's shape matrix based on the vector of marginal medians and has then a location step and a shape step which are:
spatial.median
. Then
retransforming mu_y to the original scale mu_x,k+1 = mu_y V_k^0.5 .
tyler.shape
.
The algorithm stops when the difference between two subsequent location estimates is smaller than eps.center
.
There is no proof that the algorithm converges.
A list containing:
center |
vector with the estimated loaction. |
scatter |
matrix of the estimated scatter. |
Klaus Nordhausen, klaus.nordhausen@uta.fi, and Seija Sirkiä, ssirkia@maths.jyu.fi
Hettmansperger, T.P. and Randles, R.H. (2002), A practical affine equivariant multivariate median, Biometrika, 89, 851–860.
set.seed(654321) cov.matrix <- matrix(c(3,2,1,2,4,-0.5,1,-0.5,2), ncol=3) X <- rmvnorm(100, c(0,0,0), cov.matrix) res <- HR.Mest(X) colMeans(X) res$center cov.matrix/det(cov.matrix)^(1/3) res$scatter rm(.Random.seed)