HP1.shape {ICSNP} | R Documentation |
one step M-estimator of the scatter matrix based on ranks.
HP1.shape(X, location = "Estimate", na.action = na.fail, ...)
X |
a numeric data frame or matrix. |
location |
if 'Estimate' the location and scatter matrix used for computing the spatial signs are estimated simultaneously using HR.Mest ,
if 'Origin' or numeric tyler.shape is used with respect to origin or the given value, respectively, to obtain the spatial signs. |
na.action |
a function which indicates what should happen when the data contain 'NA's. Default is to fail. |
... |
arguments that can be passed on to tyler.shape or HR.Mest . |
This is a one step M-estimator of shape which is standardized in such a way that the determinant is 1.
The exact formula is:
V=V_0^1/2 ave{a(R_i / (n+1)) u_i' u_i} V_0^1/2.
where V_0 is Tyler's shape matrix, u_i=||z_{i}||^-1 z_i is the spatial sign of z_i=(x_i-mu) V_0^-(1/2) and R_i gives the rank of ||z_i|| among ||z_1||,...,||z_n||. The van der Warden score function a(.) is the inverse of the cdf of a chi-squared distribution with p degrees of freedom.
This scatter matrix is based on the test for shape developed in the paper by Hallin and Paindaveine (2006), its usage with respect to the origin is demonstrated in Nordhausen et al. (2006).
Klaus Nordhausen, klaus.nordhausen@uta.fi
Hallin, M. and Paindaveine, D. (2006), Semiparametrically efficient rank-based inference for shape. I. Optimal rank-based tests for sphericity, Annals of Statistics, 34, 2707–2756.
Nordhausen, K., Oja, H. and Paindaveine, D. (2006), Rank-based location tests in the independent component model, Manuscript, 1, 1–15.
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) HP1.shape(X) HP1.shape(X, location="Origin") cov.matrix/det(cov.matrix)^(1/3) rm(.Random.seed)