mv.1sample.test | 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 |
stand |
the standardization method used. Possible choices are |
method |
method for the computation of the p-value for the spatial sign and spatial signed-rank tests.
Possible choices are |
n.simu |
number of simulated sign changes if |
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
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.
HotellingsT2
, sr.loc.test
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.