Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Omnibus tests are not fully covered by the effect-size guard and require correction.
No open issues 🎉
1 file not reviewed
man/estimate_contrasts.Rd: Generated file
What changed in this PR
Adds emmeans latent-scale effect sizes for ordinal models and fixes effect-size row alignment, confidence limits, and grouping behavior.
Changes:
- Supports logit/probit effect sizes for
polrandclm. - Corrects contrast-to-effect-size ordering and CI handling.
- Adds tests, documentation, NEWS, and a version bump.
| File | Summary |
|---|---|
tests/testthat/test-ordinal.R |
Tests ordinal effect sizes and validation errors. |
tests/testthat/test-estimate_contrasts_effectsize_order.R |
Tests ordering and confidence limits. |
R/get_emcontrasts.R |
Preserves contrast-row mappings. |
R/estimate_contrasts.R |
Forwards CI and rescaling options. |
R/estimate_contrasts_effectsize.R |
Implements ordinal effect sizes and validation. |
NEWS.md |
Documents the changes. |
man/estimate_contrasts.Rd |
Updates reference documentation. |
DESCRIPTION |
Bumps the development version. |
Review effort: Lite
|
|
This should work for marginaleffects backend too |
|
The marginaleffects backend cannot give these effect sizes yet, because it does not return predictions on the latent scale for ordinal models. For |
|
Or is it something that should be provided by the marginaleffects package in first instance? |
…ect sizes of reordered contrasts
…atched to their contrasts
…r shifts them; correct effect-size docs
…lear errors for nominal clm models and joint tests
…t polynomial contrasts with 6 levels
…rescale, and clarify effect-size docs and NEWS
aed6528 to
371d45a
Compare
|
Yes, I think marginaleffects needs to provide it first. I checked marginaleffects 1.0.0:
My suggestion: this PR stays with the emmeans backend, and I open a feature request in marginaleffects for a latent prediction type for |
effectsize = "emmeans"now works forpolrandclmmodels withpredict = "latent"and a logit or probit link. Sigma is the SD of the latent error,pi / sqrt(3)(logit) or1(probit).This PR also fixes
effectsize = "emmeans"for Gaussian models: effect sizes were in the wrong rows when factor levels were not sorted alphabetically, in the wrong columns withby, and always at the 95% level. Joint and omnibus tests with an effect size now give an informative error.To decide:
estimate_contrasts#227 left the choice of sigma open, and Allow joint-test for factorial designs #501 kept effect sizes to models with a variance parameter. For logit and probit models the link fixes the latent SD, so I used it. If you'd rather keep effect sizes for Gaussian models only, I can drop the ordinal part and keep the fixes.