Tukey-Kramer Multicomputer

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"))) 
+7
source share
1 answer

For unbalanced data, instead of SS type I can use anova with SS type III. Calculation of type III anons in R [2]:

 model <- (met ~ site * vtype) defopt <- options() options(contrasts=c("contr.sum", "contr.poly")) print(drop1(aov(model),~.,test="F")) options <- defopt 

For unbalanced data, pairwise comparisons of customized tools can be used. Calculation in R [4]:

 library(lsmeans) print(lsmeans(model, list(pairwise ~ site)), adjust = c("tukey")) print(lsmeans(model, list(pairwise ~ vtype)), adjust = c("tukey")) print(lsmeans(model, list(pairwise ~ site | vtype)), adjust = c("tukey")) print(lsmeans(model, list(pairwise ~ vtype | site)), adjust = c("tukey")) 

Lines 2 and 3 compare the levels of the main effects "site" and "exe". Lines 4 and 5 compare the levels of one factor at each level of another factor separately.

Hope this helps.

References

[1] Miliken and Johnsen. Analysis of dirty data. Volume 1

[2] http://www.statmethods.net/stats/anova.html

[3] http://cran.r-project.org/web/packages/lsmeans/vignettes/using-lsmeans.pdf

+8
source

All Articles