Learn R Programming

OjaNP (version 0.9-2)

oja1sampleTest: One Sample Location Test Based on Oja Signs and Ranks

Description

Function to test for location in the one sample case using Oja signs and ranks.

Usage

oja1sampleTest(X, mu = NULL, scores = "sign", p = 1,
               method = "approximation", n.simu = 1000, 
               na.action = na.fail, ...)

Arguments

X
a numeric data frame or data matrix.
mu
a vector indicating the hypothesized value of the location. NULL represents the origin.
scores
options are rank for the signed rank test, sign for the sign test. The sign test is the default.
p
value of p to be passed on to ojaSign or ojaSignedRank. The default here is to use all hyperplanes since only then the tests are valid
method
defines the method used for the computation of the p-value. The possibilities are approximation (default) or permutation which permutes the signs of the Oja signs or Oja signed ranks.
n.simu
if method = permutation specifies this the number of replications used in the permutation procedure.
na.action
a function which indicates what should happen when the data contain 'NA's. Default is to fail.
...
further arguments to be passed to or from methods.

Value

  • A list with class 'htest' containing the following components:
  • statisticthe value of the Q-statistic.
  • parameterthe degrees of freedom for the Q-statistic or the number of replications in the permutation procedure.
  • 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.

References

Hettmansperger, T. P., Nyblom, J. and Oja, H. (1994), Affine invariant multivariate one-sample sign test, Journal of the Royal Statistical Society, Series B, 56, 221--234. Hettmansperger, T. P., M�tt�nen, J. and Oja, H. (1997), Multivariate affine invariant one-sample signed-rank tests, Journal of the American Statistical Society, 92, 1591--1600.

See Also

ojaMedian, ojaSign, ojaSignedRank

Examples

Run this code
data(biochem)
oja1sampleTest(biochem[,1:2], mu = c(1.1, 0.4))
oja1sampleTest(biochem[,1:2], mu = c(1.1, 0.4), method = "p")

oja1sampleTest(biochem[,1:2], mu = c(1.1, 0.4), scores = "rank")
oja1sampleTest(biochem[,1:2], mu = c(1.1, 0.4), scores = "rank", method = "p")

Run the code above in your browser using DataLab