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

Description Usage Arguments Value Author(s) References See Also Examples

Description

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

Usage

1
2
3
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. This can make the functions quite slow, however.

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:

statistic

the value of the Q-statistic.

parameter

the degrees of freedom for the Q-statistic or the number of replications in the permutation procedure.

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.

Author(s)

Klaus Nordhausen

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.

Fischer D, Mosler K, Möttönen J, Nordhausen K, Pokotylo O and Vogel D (2020). “Computing the Oja Median in R: The Package OjaNP.” Journal of Statistical Software, 92(8), pp. 1-36. doi: 10.18637/jss.v092.i08 (URL: http://doi.org/10.18637/jss.v092.i08).

See Also

ojaMedian, ojaSign, ojaSignedRank

Examples

1
2
3
4
5
6
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")

OjaNP documentation built on Feb. 23, 2020, 5:07 p.m.