barbara costa
2012-Sep-11 12:39 UTC
[R] how to perform multiple comparisons with anova.glm significant interactions?
Dear R users I want to evaluate my significant interactions among 3 predictors in glm (one is a factor and 2 are numeric indices). I had a 3rd order interaction in my anova.glm and I'm wondering how to investigate them. I read multcomp package but I found it difficult for me. #Say e.g. (I'm not using real values and in this e.g. does not have the interactions I'm saying - but my data frame is huge) : Reserve <- rep(c("In","Out"), 100) fReserve <- factor(Reserve) DivBoulders <- rep (c(1.23,2.4,1.26,1.78,1.97,1.35,1.23,2.4,1.26,1.78), 20) Roughness <- rep(c(3.45,2.56,1.32,5.67,3.73,3.57,2.66,1.52,7.67,2.73),20) Biomass <- rep(c(8,5.3,3.5,12,25.4,10.1,9.8,2.4,5.6,5.3),20) myData <- data.frame (fReserve ,DivBoulders ,Roughness ,Biomass ) glmTest <- glm (sqrt(Biomass) ~ fReserve * DivBoulders * Roughness, family=gaussian, data=myData) plot (glmTest) anova (glmTest, test="F") # How could I hypothetically test multiple comparisons among the 3 predictors (when only one is a factor)? (or something that can help me to understrand what is happening with fish biomass in relation to reserve effect and habitat measurements at the same time). Many thanks in advance, Barbara Costa [[alternative HTML version deleted]]