[R] Tukey post hoc test for testing interaction between two or more predictors
Nicola Spotorno
nicola.spotorno at isc.cnrs.fr
Fri Aug 6 18:04:25 CEST 2010
Hi everyone,
I woudl like to apply a Tukey post hoc after a repeated measure ANOVA. I
followed the suggestions that I found in this help -list especially
this one:
/[R] Tukey HSD (or other post hoc tests) following repeated measures ANOVA
You want to use lme() in package nlme, then glht() in the multcomp package.
This will give you multiplicity adjusted p-values and confidence intervals.
## Example
require(MASS) ## for oats data set
require(nlme) ## for lme()
require(multcomp) ## for multiple comparison stuff
Aov.mod <- aov(Y ~ N + V + Error(B/V), data = oats)
Lme.mod <- lme(Y ~ N + V, random = ~1 | B/V, data = oats)
summary(Aov.mod)
anova(Lme.mod)
summary(Lme.mod)
summary(glht(Lme.mod, linfct=mcp(V="Tukey")))
HTH, Mark.
/My problem is that in my study I want to test the interactions among
different levels of two predictors. Considering oats dataset in MASS
package how can I test the contrast between one level of the variable V
(for example, Victory) and one level of the variable N(for example 0.0cwt)?
Thank you very much for your help.
Nicola
More information about the R-help
mailing list