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/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 be?). -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
From: Douglas Bates <bates at stat.wisc.edu> Date: 23 Mar 2000 17:16:03 -0600 Lines: 10 X-Mailer: Gnus v5.7/Emacs 20.5 Sender: owner-r-help at stat.math.ethz.ch Precedence: bulk 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/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ Doug, Try qtukey to get the quantile, then divide by sqrt(2) to get the multiple. Chong -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._