[R] Jonckheere-Terpstra test using coin package?

Dale Steele dale.w.steele at gmail.com
Thu Apr 22 02:23:19 CEST 2010


Is it possible to implement the Jonckheere-Terpstra test for ordered
alternatives using the coin package: Conditional Inference Procedures
in a Permutation Test Framework?

I found jonckheere.test{clinfun}, but it uses a normal approximation
when ties are present in the data.  To make this concrete, I've
include
a small dataset.  Thanks.  --Dale

Hollander and Wolfe, 1999 Table 6.6, pg 205

control <- c(40, 35, 38, 43, 44, 41)
rough <- c(38, 40, 47, 44, 40, 42)
accurate <- c(48, 40, 45, 43, 46, 44)

pieces <- list(control, rough, accurate)
n <- c(6, 6, 6)
grp <- as.ordered(factor(rep(1:length(n),n)))

library(clinfun)
jonckheere.test(unlist(pieces), grp, alternative="increasing")


Output below ...
> jonckheere.test(unlist(pieces), grp, alternative="increasing")

	Jonckheere-Terpstra test

data:
JT = 79, p-value = 0.02163
alternative hypothesis: increasing

Warning message:
In jonckheere.test(unlist(pieces), grp, alternative = "increasing") :
  TIES: p-value based on normal approximation



More information about the R-help mailing list