mv.1sample.test {MNM} | R Documentation |
Tests for multivariate location using different score functions.
mv.1sample.test(X, mu = 0, score = "identity", stand = "outer", method = "approximation", n.simu = 1000, na.action = na.fail)
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. |
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.
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. |
Klaus Nordhausen, klaus.nordhausen@uta.fi
Oja, H. (2010), Multivariate Nonparametric Methods with R, Springer.
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")