Skip to content

Commit db582dc

Browse files
committed
add section on p-adjust
1 parent fabc572 commit db582dc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

vignettes/introduction_comparisons_3.Rmd

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,24 @@ pr <- estimate_means(m_mod, c("Murder", "Illiteracy=c(0.7,1.5,2.8)"))
265265
plot(pr) + ggplot2::facet_wrap(~Illiteracy)
266266
```
267267

268+
### P-value adjustement
269+
270+
For Johnson-Neyman intervals, which arise from interactions between two numeric predictors, we are essentially conducting multiple comparisons across the values of the moderator. To account for this, p-values can be adjusted to avoid an inflation of type-I errors. For `estimate_slopes()`, you can use the `p_adjust` argument for this purpose. While common methods like `"holm"` or `"bonferroni"` are available, for the specific case of Johnson-Neyman intervals, the `"esarey"` or `"sup-t"` adjustments are particularly recommended. The `"sup-t"` method, for instance, computes simultaneous confidence bands (Montiel Olea & Plagborg-Møller, 2019), providing a more rigorous test for the interval.
271+
272+
```{r}
273+
# we will force to calculate slopes at 200 values for "Illiteracy" using `length`
274+
slopes <- estimate_slopes(
275+
m_mod,
276+
"Murder",
277+
by = "Illiteracy",
278+
length = 200,
279+
p_adjust = "esarey"
280+
)
281+
summary(slopes)
282+
```
283+
284+
The results for the p-value adjusted spotlight analysis now suggest that values below `0.50` and above `2.80` are significantly different from zero.
285+
268286
[Go to next vignette: **Contrasts and Comparisons for Generalized Linear Models**](https://easystats.github.io/modelbased/articles/introduction_comparisons_4.html)
269287

270288
# References
@@ -273,4 +291,6 @@ Johnson, P.O. & Fay, L.C. (1950). The Johnson-Neyman technique, its theory and a
273291

274292
McCabe CJ, Kim DS, King KM. (2018). Improving Present Practices in the Visual Display of Interactions. Advances in Methods and Practices in Psychological Science, 1(2):147-165. doi:10.1177/2515245917746792
275293

294+
Montiel Olea, J. L., and Plagborg-Møller, M. (2019). Simultaneous confidence bands: Theory, implementation, and an application to SVARs. Journal of Applied Econometrics, 34(1), 1–17. doi:10.1002/jae.2656
295+
276296
Spiller, S. A., Fitzsimons, G. J., Lynch, J. G., & McClelland, G. H. (2013). Spotlights, Floodlights, and the Magic Number Zero: Simple Effects Tests in Moderated Regression. Journal of Marketing Research, 50(2), 277–288. doi:10.1509/jmr.12.0420

0 commit comments

Comments
 (0)