Hi R-helpers, TukeyHSD() works for models fitted with aov(), but could anyone point me to a function that performs a similar post hoc test for models fitted with lm() or glm()? Thanks in advance, Mark
The R multcomp package provides one general approach to multiplicity correction. For general contrasts in lm and glm, the rms package's ols and Glm functions make this even easier to use. Frank Mark Na wrote> > Hi R-helpers, > > TukeyHSD() works for models fitted with aov(), but could anyone point > me to a function that performs a similar post hoc test for models > fitted with lm() or glm()? > > Thanks in advance, > > Mark > > ______________________________________________ > R-help@ mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Post-hoc-test-for-lm-or-glm-tp4352761p4352799.html Sent from the R help mailing list archive at Nabble.com.
The glht function in the multcomp package is what you are looking for. There are additional examples in the ?MMC help file in the HH package. Rich On Thu, Feb 2, 2012 at 3:42 PM, Mark Na <mtb954@gmail.com> wrote:> Hi R-helpers, > > TukeyHSD() works for models fitted with aov(), but could anyone point > me to a function that performs a similar post hoc test for models > fitted with lm() or glm()? > > Thanks in advance, > > Mark > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Apparently Analagous Threads
- Tukey HSD (or other post hoc tests) following repeated measures ANOVA
- Is using glht with "Tukey" for lme post-hoc comparisons an appropriate substitute to TukeyHSD?
- Post Hoc tests for ANOVA
- Tukey HSD Test als Post Hoc Test nach einem GLM inkl. Anova
- ANCOVA post-hoc test