Skip to main content
3 of 3
deleted 16 characters in body
Sointu
  • 2.8k
  • 5
  • 13

In principle*, you can use emmeans emtrends for this. You need to choose a couple of "testing points" for your other continuous predictor. This is easiest if you standardize your predictors and choose for instance points -1, 0, 1 for predictor 1. This way you will be comparing predictor 2 slopes at predictor 1's levels of mean-1 SD, mean, and mean +1 SD, which I find is often reasonable way to test continuous-continuous interaction. So, first standardize your predictors, then run the model again with standardized predictors, then:

library(emmeans)
emtrends(modelname, pairwise ~ levelBetween, var = "levelWithin", at=list(levelBetween=c(-1,0,1)) 

You don't have to standardize though if you can find reasonable testing points from the predictor's raw values.

*However, I wonder about your stress type variable - can it really be understood as continuous? I understand you need to somehow get the mean value from it but I wonder what the resulting variable actually represents because it was originally categorical (?). But in principle you can use the above with a cont x cont interaction.

Sointu
  • 2.8k
  • 5
  • 13