I hope somebody is available to help a desperate rookie..
I fitted a glmer with a Poisson distribution and log link, including main effects and several interactions, an offset variable and a random effect. Something like this:
model1 <- glmer(count ~ A + B + C + A*B + offset(log(X)) + ( 1 | D), data = workmap, family = poisson(link = "log"))
A, B and C are all factors with two levels.
My Prof generated "contrasts of marginal linear predictions" in Stata to, for example, look at the contrasts provided by A@B, or just simply A. I now want to do the same but in R by making use of the emmeans package.
First: should I use emmeans() or contrast() command? What is the difference? I did the following: emm <- emmeans(model1, pairwise ~ A | B)
Was that the right thing to do or should I have used the contrast() command?