From Matthias.Kohl at stamats.de  Sat Oct 25 16:19:13 2008
From: Matthias.Kohl at stamats.de (Matthias Kohl)
Date: Sat, 25 Oct 2008 16:19:13 +0200
Subject: [Rd] pairwise.wilcox.test for paired samples
Message-ID: <49032AE1.3040209@stamats.de>

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



[Rd] pairwise.wilcox.test for paired samples
Matthias Kohl