[R] Tukey multiple comparisons
john.maindonald@anu.edu.au
john.maindonald at anu.edu.au
Fri Mar 24 08:24:02 CET 2000
At 12:56 AM 24/03/00 -0500, Chong Gu wrote:
>
> From: Douglas Bates <bates at stat.wisc.edu>
> 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?
> --
> Douglas Bates bates at stat.wisc.edu
> Statistics Department 608/262-2598
> University of Wisconsin - Madison http://www.stat.wisc.edu/~bates/
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>Doug,
>
>Try qtukey to get the quantile, then divide by sqrt(2) to get the
>multiple.
>
>Chong
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
Or you may want the generalisation to nmeans>2 and df
different from 100 (= df of estimate of common variance)
> ptukey(1.96*sqrt(2),2,100,lower.tail=F)
[1] 0.0527789
The studentised range divides by the (assumed common) SE of the
means, while the equivalent t-statistic divides by the SED; hence
the sqrt(2). If the SEDs are somewhat unequal, it may not be
too bad to calculate:
ptukey(t*sqrt(2), nmeans,df,lower.tail=F)
where t is the largest of the pairwise t-statistics.
[But one must not call it t!]
John Maindonald email : john.maindonald at anu.edu.au
Statistical Consulting Unit, phone : (6249)3998
c/o CMA, SMS, fax : (6249)5549
John Dedman Mathematical Sciences Building
Australian National University
Canberra ACT 0200
Australia
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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