I am doing a GLMM analysis using R, where I have 2 predictor variables (fixed effects) which do not interact, each one has few levels. My factors are “Habitat” and “Year”.
I am interested in doing a post-hoc multiple pairwise comparison between the 4 levels of “Habitat”, to see which ones are significantly different, within every year.
When I use contrast(habitat.dif, alpha=0.05, method="pairwise", adjust="Tukey"), I get a comparison between the averages of the groups across all years and not within every year.
My model is:
abundance.model1