[Rd] pairwise.wilcox.test for paired samples

Matthias Kohl Matthias.Kohl at stamats.de
Sat Oct 25 16:19:13 CEST 2008


Dear R Core,

pairwise.wilcox.test does not handle "paired = TRUE" correctly; e.g.

set.seed(13)
x <- rnorm(20)
g <- c(rep(1, 10), rep(2, 10))
wilcox.test(x ~ g)$p.value # 0.075
pairwise.wilcox.test(x, g)$p.value # 0.075, o.k
wilcox.test(x ~ g, paired = TRUE)$p.value # 0.105
pairwise.wilcox.test(x, g, paired = TRUE)$p.value # 0.075, wrong


The line
    wilcox.test(xi, xj, ...)$p.value

should read
   wilcox.test(xi, xj, paired = paired, ...)$p.value

Best regards,
Matthias

############################
my sessionInfo:
R version 2.8.0 Patched (2008-10-23 r46779)
i686-pc-linux-gnu

locale:
LC_CTYPE=de_DE.UTF-8;LC_NUMERIC=C;LC_TIME=de_DE.UTF-8;LC_COLLATE=de_DE.UTF-8;LC_MONETARY=C;LC_MESSAGES=de_DE.UTF-8;LC_PAPER=de_DE.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=de_DE.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

-- 
Dr. Matthias Kohl
www.stamats.de



More information about the R-devel mailing list