Skip to content

Use each row's own slope for esarey p-values in estimate_slopes() - #726

Merged
strengejacke merged 1 commit into
easystats:mainfrom
chenyangsu:fix/esarey-p-values
Nov 28, 2026
Merged

strengejacke merged 1 commit into
easystats:mainfrom
chenyangsu:fix/esarey-p-values

Conversation

@chenyangsu

Copy link
Copy Markdown
Contributor

With p_adjust = "esarey", estimate_slopes() takes each row's p-value from another moderator value. For lm(Sepal.Width ~ Petal.Width * Petal.Length, iris), the row at Petal.Length 4.28 shows p = 0.033 while its CI is [-0.08, 0.54], and with length = 20 rows 6 to 20 are NA.

Each row now uses its own slope and SE, divided by the BH multiplier behind the critical t (matching interactionTest::fdrInteraction()), so p < .05 exactly when the CI excludes zero. Happy to keep them unadjusted instead. Version bump and NEWS item included.

Testing: test-estimate_slopes.R 80 passed (new test fails on main), test-p_adjust.R 23 passed.

@strengejacke
strengejacke merged commit 5e7a2ae into easystats:main Nov 28, 2026
5 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants