Skip to content

Newbie question Multcomp

2 messages · qwe84, Richard M. Heiberger

#
Hello, I'm a totally newbie to R and I'm taking a class using S+.

In the class we use the multcomp command which takes a aov object and
calculates confidence intervals for all pairwise differences by the Fisher
least significant differences method.

How can I do this in R. 

Thank you for taking the time with such a basic question. I've been looking
on the net for a few days and I can't seem to find an answer clear enough
for my level.
#
qwe84 wrote:
In R, the package is multcomp.

From
?glht
  ### multiple comparison procedures
  ### set up a one-way ANOVA
  amod <- aov(breaks ~ tension, data = warpbreaks)

  ### set up all-pair comparisons for factor `tension'
  ### using a symbolic description (`type' argument
  ### to `contrMat()')
  glht(amod, linfct = mcp(tension = "Tukey"))

I usually use additional functions in the package

amod.glht <- glht(amod, linfct = mcp(tension = "Tukey"))
confint(amod.glht)
plot(amod.glht)