Nicola Spotorno
2010-Aug-06 16:04 UTC
[R] Tukey post hoc test for testing interaction between two or more predictors
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
Maybe Matching Threads
- Tukey post hoc test and two way repeated measures ANOVA
- broken example: lme() + multcomp() Tukey on repeated measures design
- Is using glht with "Tukey" for lme post-hoc comparisons an appropriate substitute to TukeyHSD?
- Tukey HSD plot with lines indicating (non-)significance
- Tukey HSD (or other post hoc tests) following repeated measures ANOVA