Learn R Programming

MNM (version 0.95-2)

mv.2way.test: Randomized Complete Block Design.

Description

Multivariate tests for testing the null hypothesis that there is no treatment effect in a randomized complete block design using different scores.

Usage

mv.2way.test(x, block, treatment, score = c("identity", "sign", 
             "rank"), stand = c("outer", "inner"), 
             method = c("approximation", "permutation"),
             n.simu = 1000, eps=1.0e-10, n.iter=10000, 
             na.action = na.fail)

Arguments

x
a numeric data frame or matrix of response variables.
block
a factor with at least two levels.
treatment
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 rank tests. Possible choices are approximation and permutation.
n.simu
number of simulated permutations if method="permutation".
eps
convergence criterion.
n.iter
maximum number of iterations.
na.action
a function which indicates what should happen when the data contain 'NA's. Default is to fail.

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 null hypothesis 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 tests described in chapter 12 of the MNM book.

References

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

See Also

mv.1sample.test, mv.Csample.test , mv.2way.est

Examples

Run this code
blocks <- gl(10, 5)
treatments <- factor(rep(1:5, 10))
X <- rmvnorm(n = 50, mean = c(1,2,3), sigma = diag(3))
mv.2way.test(X, blocks, treatments, score="r", stand="i", method="a")

Run the code above in your browser using DataLab