-
-
Notifications
You must be signed in to change notification settings - Fork 24
Addition of WMWodds (wmw_odds function) #496
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
Conversation
Results don't look good
Not viable for paired samples
Need unit tests
|
Conflicts will need to be resolved, but all changes to files other than |
|
I'm reading the docs, and it seems like this function would be better suited under the common-language effect sizes. Also, it seems like this function produces the same results are library(effectsize)
p <- rb_to_cles(rank_biserial(mpg ~ am, data = mtcars))
p[c(2, 4:5)] <- lapply(p[c(2, 4:5)], probs_to_odds)
colnames(p)[2] <- "odds"
p[-1]
#> odds | 95% CI
#> -------------------
#> 0.20 | [0.09, 0.47]
# The same...?
wmw_odds(mpg ~ am, data = mtcars)
#> odds | 95% CI
#> -------------------
#> 0.20 | [0.07, 0.58]
x <- c(1.83, 0.50, 1.62, 2.48, 1.68, 1.88, 1.55, 3.06, 1.30)
y <- c(0.878, 0.647, 0.598, 2.05, 1.06, 1.29, 1.06, 3.14, 1.29)
p <- rb_to_cles(rank_biserial(x, y))
p[c(2, 4:5)] <- lapply(p[c(2, 4:5)], probs_to_odds)
colnames(p)[2] <- "odds"
p[-1]
#> odds | 95% CI
#> -------------------
#> 2.52 | [0.84, 7.55]
# The same...?
wmw_odds(x, y)
#> odds | 95% CI
#> -------------------
#> 2.52 | [0.66, 9.61]
p <- rb_to_cles(rank_biserial(cyl ~ am, data = mtcars))
p[c(2, 4:5)] <- lapply(p[c(2, 4:5)], probs_to_odds)
colnames(p)[2] <- "odds"
p[-1]
#> odds | 95% CI
#> -------------------
#> 3.66 | [1.60, 8.37]
# The same...?
wmw_odds(cyl ~ am, data = mtcars)
#> odds | 95% CI
#> -------------------
#> 3.66 | [1.48, 9.07]Created on 2022-09-24 by the reprex package (v2.0.1) So unless there is a reason not to use |
|
Okay, I have two reasons.
For example: It's totally up to you and your team, but as a user of effectsize, I would really like this function 😓 Happy to convert this over to |
|
Here's what I suggest:
|
|
Ok, I will get on that shortly and thank you! I will close this pull request and start working on the CLES improvements. |
Description
This PR aims at adding WMWodds (Agresti's Generalized Odds Ratio) to the rank based effect sizes. Using the
odds_to_probsfunction, the output can be considered a concordance probability or a non-parametric probability of superiority.Proposed Changes
I created the
wmw_oddsfunction which effectively mimicsrank_biserialbut instead calculates the odds. Tests and vignettes have also been added.