Last data update: 2014.03.03

R: Hallin and Paindaveine Signed-Rank Tests
HP.loc.testR Documentation

Hallin and Paindaveine Signed-Rank Tests

Description

This function implements the signed-rank location tests as suggested by Hallin and Paindaveine (2002a, 2002b).

Usage

HP.loc.test(X, mu = NULL, score = "rank", angles = "tyler", 
            method = "approximation", n.perm = 1000, 
            na.action = na.fail)

Arguments

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 method="permutation" specifies this the number of replications used in the permutation procedure.

na.action

a function which indicates what should happen when the data contain 'NA's. Default is to fail.

Details

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.

Value

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.

Author(s)

Klaus Nordhausen, klaus.nordhausen@uta.fi

References

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.

See Also

tyler.shape, spatial.sign

Examples

X <- rmvnorm(100, c(0,0,0.1)) 
HP.loc.test(X)
HP.loc.test(X, score="s")
HP.loc.test(X, score="n")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ICSNP)
Loading required package: mvtnorm
Loading required package: ICS
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ICSNP/HP.loc.test.Rd_%03d_medium.png", width=480, height=480)
> ### Name: HP.loc.test
> ### Title: Hallin and Paindaveine Signed-Rank Tests
> ### Aliases: HP.loc.test
> ### Keywords: htest multivariate nonparametric
> 
> ### ** Examples
> 
> X <- rmvnorm(100, c(0,0,0.1)) 
> HP.loc.test(X)

	TYLER ANGLES RANK TEST

data:  X
Q.W = 7.7449, df = 3, p-value = 0.05159
alternative hypothesis: true location is not equal to c(0,0,0)

> HP.loc.test(X, score="s")

	TYLER ANGLES SIGN TEST

data:  X
Q.S = 3.3396, df = 3, p-value = 0.3422
alternative hypothesis: true location is not equal to c(0,0,0)

> HP.loc.test(X, score="n")

	TYLER ANGLES VAN DER WAERDEN TEST

data:  X
Q.N = 6.7047, df = 3, p-value = 0.08193
alternative hypothesis: true location is not equal to c(0,0,0)

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>