Learn R Programming

MNM (version 0.95-2)

mv.Csample.test: C Sample Test of Location

Description

Several samples location tests using different scores.

Usage

mv.Csample.test(X, g, score = "identity", stand = "outer", 
                method = "approximation", n.simu = 1000, 
                na.action = na.fail, ...)

Arguments

X
a numeric data frame or matrix of response values.
g
a factor with at least two levels.
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 permutation.
n.simu
number of simulated sign changes if method="permutation".
na.action
a function which indicates what should happen when the data contain 'NA's. Default is to fail.
...
arguments that can be passed on to functions used for the estimation of the spatial signs and spatial ranks.

Value

  • A list with class 'htest' containing the following components:
  • statisticthe value of the test statistic.
  • parameterthe degrees of freedom for the test statistic or the number of replications in the simulation.
  • p.valuethe p-value for the test.
  • null.valuethe specified hypothesized value of the location.
  • alternativea character string with the value 'two.sided'.
  • methoda character string indicating what type of test was performed.
  • data.namea character string giving the name of the data set and of the grouping vector.

Details

This implements the location tests based on identity, sign or rank scores as described in chapter 11 of the MNM book.

References

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

See Also

spatial.sign, spatial.rank, HotellingsT2

Examples

Run this code
X <- rmvt(150,diag(1,3))
g1 <- gl(3,50)
mv.Csample.test(X, g1)
mv.Csample.test(X, g1, score = "s")
mv.Csample.test(X, g1, score = "r")

Y <- rbind(rmvnorm(40,c(0,0,0)), rmvnorm(60,c(0,0,0.4)))
g2 <- factor(rep(1:2, c(40, 60)))
mv.Csample.test(Y, g2, score = "r")
mv.Csample.test(Y, g2, score = "r", method="p")

Run the code above in your browser using DataLab