interactions icon indicating copy to clipboard operation
interactions copied to clipboard

add Dawson & RIchter's (2006) simple slope difference test

Open davidrast3 opened this issue 6 years ago • 2 comments

Could you add a function to provide Dawson & RIchter's (2006) simple slope difference test for three-way interactions? The 'pequod' package has this in its "simpleSlope()" function but that package hasn't been updated in a couple of years.

davidrast3 avatar Dec 10 '19 04:12 davidrast3

Hmm, I'm not sure of a way to build a great interface to this. If my quick analysis and tinkering is correct, a "default" implementation that tests all contrasts with default behavior for everything else (i.e., 3 unique modx.values and 3 unique mod2.values) you're looking at 36 distinct contrasts to test. Not only does this bring up multiple comparison issues (which I see Dawson & Richter recognized) but it also implies some very unwieldy output. If someone dared asked for 4 each of modx.values and mod2.values, then you're looking at 144(!) distinct contrasts.

I think it could make more sense not to use every possible contrast and instead look at a more limited set. For instance,

Compare the slope when modx = -1 SD and mod2 = -1 SD with:

  • When modx = -1 SD and mod2 = Mean
  • When modx = -1 SD and mod2= +1 SD

Such that you're isolating the effect of the second moderator.

To have complete coverage of the modx = -1 SD scenario, you'd only need one more contrast: when modx = -1 SD and mod2 = Mean vs. when modx = -1 SD and mod2= +1 SD.

Then you have "only" 9 comparisons in a standard scenario.

But I struggle to think of a decent way to have users request specific comparisons without generating a lot of help requests. I'll give it some thought though and have sketched up some of the internal functions that would be needed to do it.

jacob-long avatar Dec 12 '19 18:12 jacob-long

I'm not sure if other packages conduct Dawson & Richter's simple slope difference test, I'm only familiar with 'pequod'. That is my baseline. It provides ALL t-tests for 3-way simple slopes with Bonferroni corrections. The presentation is awful, as you predicted it would be. I think the way you implemented modx.values = "plus-minus" in probe_interaction() is very simple, and is understandable for people less knowledgeable in R. You could allow users to select which levels they want in a manner similar to how you allow for modx.values = "plus-minus" in probe_interaction(). This would cut down from the 36 distinct contrasts you mentioned.

Another option could be to give users the option to specify the desired slope comparisons (e.g., [1,1,1, vs 1,2,2]) where users could decide on specifically planned contrasts. The syntax can be simple and easy (similar to the above modx.values=), rather the complicated and unintuitive approach used by 'emmeans' contrast().

For output, I think providing a tibble could help improve the readability. Something similar to the output given by the 'parameters' package (https://easystats.github.io/parameters/):

slope_1 slope_2 coefficient t p-value
iv1_l:iv2_l:iv3_l iv1_l:iv2_h:iv3_h .015 1.0 .55

davidrast3 avatar Dec 12 '19 23:12 davidrast3