[R] Doing pairwise comparisons using either Duncan, Tukey or LSD

Chuck Cleland ccleland at optonline.net
Thu Feb 19 19:20:28 CET 2009


On 2/19/2009 11:51 AM, Saeed Ahmadi wrote:
> Hi,
> 
> I have a basic and simple question on how to code pairwise (multiple) mean
> compariosn between levels of a factor using one of the Duncan, Tukey or LSD.

  Here is one approach:

library(multcomp)

summary(glht(lm(Petal.Width ~ Species, data = iris), linfct =
mcp(Species = "Tukey")))

> Thanks in advance,
> Saeed  

-- 
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894




More information about the R-help mailing list