0
$\begingroup$

I would like to see the joint effects of an interaction term. I tried joint_tests() but it gives f ratios. However, I would prefer Incidence Rate Ratios (IRR) because the rest of my results section uses those. My model is a GLMM with Poisson distribution. Any ideas?

I also tried the following but the outcome remains the same:

EMM <- emmeans(model1, ~ A | B) 
PRS <- contrast(EMM, "revpairwise", interaction = "consec")  
summary(PRS)
summary(PRS, type = "response", infer = c(TRUE, TRUE))

Thank you in advance!

$\endgroup$
6
  • $\begingroup$ Is IRR really interval rate ratios, or do you mean incidence rate ratios? I'm well familiar with Poisson models for estimating the latter, but have never heard of the former $\endgroup$
    – AdamO
    Oct 13 at 21:48
  • $\begingroup$ You can use, say, contrast(emm, interaction = "consec") to obtain comparisons of comparisons at consecutive levels. See the vignette on interactions. $\endgroup$
    – Russ Lenth
    Oct 13 at 23:58
  • $\begingroup$ @RussLenth Hi, I've tried that but my outcome is the same, any advice? I quickly added your suggestion in the question to show what I did. $\endgroup$
    – Ronja
    Oct 14 at 6:06
  • $\begingroup$ @AdamO Yes, you are right. $\endgroup$
    – Ronja
    Oct 14 at 6:11
  • $\begingroup$ Thee are two things wrong. One, you asked for both regular contrasts and interaction contrasts. So decide which (interaction I think, but I'm never sure I understand what you want). Second, if you do want interaction contrasts, your EMM has B as a by variable, so A is out there by itself with nothing to interact with. Try contrast(EMM, interaction = "consec", by = NULL). And also think about this and do your best to understand why. $\endgroup$
    – Russ Lenth
    Oct 14 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.