Testing against Ordered Alternatives (Jonckheere-Terpstra Test)
Performs the Jonckheere-Terpstra test for testing against ordered alternatives.
jonckheereTest(x, ...) ## Default S3 method: jonckheereTest( x, g, alternative = c("two.sided", "greater", "less"), continuity = FALSE, ... ) ## S3 method for class 'formula' jonckheereTest( formula, data, subset, na.action, alternative = c("two.sided", "greater", "less"), continuity = FALSE, ... )
x |
a numeric vector of data values, or a list of numeric data vectors. |
... |
further arguments to be passed to or from methods. |
g |
a vector or factor object giving the group for the
corresponding elements of |
alternative |
the alternative hypothesis. Defaults to |
continuity |
logical indicator whether a continuity correction
shall be performed. Defaults to |
formula |
a formula of the form |
data |
an optional matrix or data frame (or similar: see
|
subset |
an optional vector specifying a subset of observations to be used. |
na.action |
a function which indicates what should happen when
the data contain |
The null hypothesis, H_0: θ_1 = θ_2 = … = θ_k is tested against a simple order hypothesis, H_\mathrm{A}: θ_1 ≤ θ_2 ≤ … ≤ θ_k,~θ_1 < θ_k.
The p-values are estimated from the standard normal distribution.
A list with class "htest"
containing the following components:
a character string indicating what type of test was performed.
a character string giving the name(s) of the data.
the estimated quantile of the test statistic.
the p-value for the test.
the parameters of the test statistic, if any.
a character string describing the alternative hypothesis.
the estimates, if any.
the estimate under the null hypothesis, if any.
The code for the computation of the standard deviation
for the Jonckheere-Terpstra test in the presence of ties was taken from:
Kloke, J., McKean, J. (2016) npsm: Package for Nonparametric Statistical Methods using R. R package version 0.5. https://CRAN.R-project.org/package=npsm
jonckheereTest(x, g, alternative = "two.sided", continuity = TRUE)
is
equivalent to
cor.test(x, as.numeric(g), method = "kendall", alternative = "two.sided", continuity = TRUE)
Jonckheere, A. R. (1954) A distribution-free k-sample test against ordered alternatives. Biometrica 41, 133–145.
Kloke, J., McKean, J. W. (2015) Nonparametric statistical methods using R. Boca Raton, FL: Chapman & Hall/CRC.
kruskalTest
and shirleyWilliamsTest
of the package PMCMRplus,
kruskal.test
of the library stats.
## Example from Sachs (1997, p. 402) x <- c(106, 114, 116, 127, 145, 110, 125, 143, 148, 151, 136, 139, 149, 160, 174) g <- gl(3,5) levels(g) <- c("A", "B", "C") ## Chacko's test chackoTest(x, g) ## Cuzick's test cuzickTest(x, g) ## Johnson-Mehrotra test johnsonTest(x, g) ## Jonckheere-Terpstra test jonckheereTest(x, g) ## Le's test leTest(x, g) ## Spearman type test spearmanTest(x, g) ## Murakami's BWS trend test bwsTrendTest(x, g) ## Fligner-Wolfe test flignerWolfeTest(x, g) ## Shan-Young-Kang test shanTest(x, g)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.