Learn R Programming

MNM (version 1.0-4)

mv.1sample.test: Multivariate Location Tests

Description

Tests for multivariate location using different score functions.

Usage

mv.1sample.test(X, mu = 0, score = "identity", stand = "outer", 
                method = "approximation", n.simu = 1000, 
                na.action = na.fail)

Value

A list with class 'htest' containing the following components:

statistic

the value of the test statistic.

parameter

the degrees of freedom for the test statistic or the number of replications in the simulation.

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 set.

Arguments

X

a numeric data frame or matrix.

mu

the null hypothesis value. Default is the zero vector.

score

the score to be used. Possible choices are identity, sign and rank.

stand

the standardization method used. Possible choices are outer and inner.

method

method for the computation of the p-value for the spatial sign and spatial signed-rank tests. Possible choices are approximation and signchange.

n.simu

number of simulated sign changes if method=signchange.

na.action

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

Author

Klaus Nordhausen

Details

The tests provided here are the Hotelling's T^2 test, the spatial sign test and the signed-rank test and their affine invariant versions in the one sample location case.

Note that for the identity score the provided test is not the traditional Hotelling's T^2 test because here the covariance matrix is computed wrt to the null value and not wrt to the sample mean. Use the function HotellingsT2 for the traditional version of Hotelling's T^2 test. Details about the tests can be found in the chapters 5-8 of the MNM book.

References

Oja, H. (2010), Multivariate Nonparametric Methods with R, Springer.

Nordhausen, K. and Oja, H. (2011), Multivariate L1 Methods: The Package MNM, Journal of Statistical Software, 43, 1-28.

See Also

HotellingsT2, sr.loc.test

Examples

Run this code
library(mvtnorm)
X <- rmvt(100, diag(c(1, 2, 0.5)), 3)

mv.1sample.test(X,mu=c(0,0,0.5))
mv.1sample.test(X,score="s", stand="i")
mv.1sample.test(X,score="s", stand="i", method="s")
mv.1sample.test(X,score="r", stand="o")
mv.1sample.test(X,score="r", stand="i")

Run the code above in your browser using DataLab