Learn R Programming

MNM (version 0.95-0)

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

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