Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davidrast3 opened this issue Dec 10, 2019 · 2 comments
Open

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

davidrast3 opened this issue Dec 10, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@davidrast3
Copy link

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.

@jacob-long
Copy link
Owner

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 jacob-long added the enhancement New feature or request label Dec 12, 2019
@davidrast3
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants