[R] Tukey multiple comparisons

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Fri Mar 24 01:22:50 CET 2000

Douglas Bates <bates at stat.wisc.edu> writes:

> I am embarrassed to have to ask this but can anyone tell me of a Tukey
> multiple comparisons procedure available for R?  I have looked through
> the search page, through the FAQ, and in the index of V&R (1999), and
> I still can't find such a thing.  I see there is a ptukey function and
> a qtukey function but that is as far as I got.  Do I need to roll my
> own?

Yup. It's somewhere on by backlog of things to get around to some
time. Which particular variant were you thinking of? There are at
least two multiple comparison procedures for balanced groups based on
Tukey's HSD (Newman-Keuls and REGW-something). 

I did have it in the back of my mind when writing pairwise.t.test, and
I do believe that the Tukey based procedures can be formulated in
terms of adjusted p-values, there are some hints in that direction in
the Biometrics reference given (and which Thomas originally pointed
to); I just didn't get around to reading it well enough.

One issue is whether to enforce identical groups sizes. Formally, the
Tukey (aka Studentized Range) distribution presupposes that the group
sizes are equal, and MCP with very unequal group sizes can be
anomalous (consider three groups of which one is small and the others
are large and the group means A<B<C: then it can happen that A is
significantly different from B but not from C and the procedures
assume transitivity). Several other packages *will* perform the
procedures for unbalanced groups, but I wouldn't really trust that
unless the group counts were rather close (and how close should they

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list