This function implements the signed-rank location tests as suggested by Hallin and Paindaveine (2002a, 2002b).
HP.loc.test(X, mu = NULL, score = "rank", angles = "tyler",
method = "approximation", n.perm = 1000,
na.action = na.fail)
A list with class 'htest' containing the following components:
the value of the Q-statistic.
the degrees of freedom for the Q-statistic.
the p-value for the test.
the specified hypothesized value of the location.
a character string with the value 'two.sided'.
a character string indicating what type of test was performed.
a character string giving the name of the data.
a numeric data frame or matrix.
a vector indicating the hypothesized value of the location. NULL represents the origin.
score for the pseudo mahalanobis distance. Options are 'rank', 'sign' and 'normal' scores.
which angle to use. Possible are 'tyler' for spatial sign type anlges or 'interdirections'. Note however that currently only 'tyler' is implemented.
defines the method used for the computation of the p-value. The possibilites are 'approximation' or 'permutation'.
if method="permutation"
specifies this the number of replications used in the permutation procedure.
a function which indicates what should happen when the data contain 'NA's. Default is to fail.
Klaus Nordhausen
The test based on interdirections is described in Hallin and Paindaveine (2002a) and the test based on Tyler's angles is described in Hallin and Paindaveine (2002b). The two different tests are asymptotically equivalent and in both cases is assumed that the data comes from an elliptic distribution.
Hallin, M. and Paindaveine, D. (2002a), Optimal tests for multivariate location based on interdirections and pseudo-Mahalanobis ranks, Annals of Statistics, 30, 1103--1133.
Hallin, M. and Paindaveine, D. (2002b), Randles' interdirections or Tyler's angles?, In Y. Dodge, Ed. Statistical data analysis based on the L1-norm and related methods, 271--282.
tyler.shape
, spatial.sign
X <- rmvnorm(100, c(0,0,0.1))
HP.loc.test(X)
HP.loc.test(X, score="s")
HP.loc.test(X, score="n")
Run the code above in your browser using DataLab