Learn R Programming

PMCMR (version 4.3)

jonckheere.test: Jonckheere-Terpstrata test for testing k independent samples against ordered alternatives

Description

Applies the Jonckheere-Terpstrata test.

Usage

jonckheere.test (x, …)

# S3 method for default jonckheere.test (x, g, alternative = c("monotonic", "increasing", "decreasing"), …)

Arguments

x

a numeric vector of data values, or a list of numeric data vectors.

g

a vector or factor object giving the group for the corresponding elements of x. Ignored if x is a list.

alternative

The alternative hypothesis. Defaults to monotonic.

further arguments to be passed to or from methods.

Value

A list with class "PMCMR"

method

The applied method.

data.name

The name of the data.

p.value

The p-value of the standard normal distribution.

statistic

The estimated quantile of the standard normal distribution.

alternative

The alternative hypothesis.

%% ...

Details

The global H0, the k medians (med) are equal, is tested against the HA: med_1 <= med_2 <= ... <= med_k (increasing trend; one-sided test). It can also be tested for decreasing trend (one-sided test) and monotonic trend (two sided test).

See the vignette for details.

References

A. R. Jonckheere (1954). A distribution-free k-sample test against ordered alternatives. Biometrica, 41, 133-145.

L. Sachs (1997), Angewandte Statistik. Berlin: Springer.

See Also

kruskal.test

Examples

Run this code
# NOT RUN {
##
## Example from Sachs (1997, p. 402)
x <- c(106, 114, 116, 127, 145, 110, 125,
       143, 148, 151, 136, 139, 149, 160,
       174)
g <- as.factor(c(rep(1,5), rep(2,5), rep(3,5)))
levels(g) <- c("A", "B", "C")
jonckheere.test(x , g, "increasing")
# }

Run the code above in your browser using DataLab