HP.loc.test | R Documentation |
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)
X |
a numeric data frame or matrix. |
mu |
a vector indicating the hypothesized value of the location. NULL represents the origin. |
score |
score for the pseudo mahalanobis distance. Options are 'rank', 'sign' and 'normal' scores. |
angles |
which angle to use. Possible are 'tyler' for spatial sign type anlges or 'interdirections'. Note however that currently only 'tyler' is implemented. |
method |
defines the method used for the computation of the p-value. The possibilites are 'approximation' or 'permutation'. |
n.perm |
if |
na.action |
a function which indicates what should happen when the data contain 'NA's. Default is to fail. |
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.
A list with class 'htest' containing the following components:
statistic |
the value of the Q-statistic. |
parameter |
the degrees of freedom for the Q-statistic. |
p.value |
the p-value for the test. |
null.value |
the specified hypothesized value of the location. |
alternative |
a character string with the value 'two.sided'. |
method |
a character string indicating what type of test was performed. |
data.name |
a character string giving the name of the data. |
Klaus Nordhausen
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.