How to do a post-hoc test using the 'emmeans' package

For a university project, I have run a non-parametric Generalised Linear Model as shown below:

g1a<-glm(total.abundance~H.stipulacea.cover*site, data = shells, family = poisson(link="log"))

g1b<-glm(total.abundance~shells$H.stipulacea.cover+shells$site, data=shells, family = poisson(link="log"))
anova(g1a,glb, test='Chisq') # significant

I found an interaction of the site variable, which is categorical and made up of 5 factors (sites), to be significant. In my results, I wanted to understand the nature of the interaction for each of the factors within the variable site. I have been told that Post Hoc tests for GLMs are different from ANCOVAS, and it has been suggested I use the 'emmeans' package. Do you know how I would do this?

I don't think i can share my data but any example similar to this would be great.

Many thanks!

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.