I have an experiment that is unbalanced, where in three places (L, M, H) we measure the parameter ( met ) in four different types of vegetation (a, b, c, d). All types of vegetation are present at all three sites. Types of vegetation replicate 4 times in L and M and 8 times in H.
Therefore simple anova and TukeyHSD will not work. The Agricolae ( HSD.test ) and DTK ( DTK.test ) DTK.test work only in a one-sided design, and then there is a multicomplex ... Tukey test in mcp function calculates Tukey-Kramer contrasts or gives regular Tuki contrasts? I assume this is the first case because the package is designed to test several comparisons for unbalanced constructs, but I'm not sure because the p values ββobtained with both approaches are almost the same. Which test would then be appropriate?
Also, are there more appropriate approaches to creating such a two-way schema for unbalanced data sets?
library(multcomp) (met <- c(rnorm(16,6,2),rnorm(16,5,2),rnorm(32,4,2))) (site <- c(rep("L", 16), rep("M", 16), rep("H", 32))) (vtype <- c(rep(letters[1:4], 16), rep(letters[1:4], 16), rep(letters[1:4], 32))) dat <- data.frame(site, vtype, met) # using aov and TukeyHSD aov.000 <- aov(met ~ site * vtype, data=dat) summary(aov.000) TukeyHSD(aov.000) # using Anova, and multcomp lm.000 <- lm(met ~ site * vtype, data=dat) summary(lm.000) library(car) Anova.000 <- Anova(lm.000, data=dat) dat$int <- with(dat, interaction(site, vtype, sep = "x")) lm.000 <- lm(met ~ int, data = dat) summary(lm.000) summary(glht.000 <- glht(lm.000, linfct = mcp(int = "Tukey")))