-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Accounting for "ties" in rank-biserial corr in paired/one-sample cases #502
Comments
I am unfamiliar with this correction - where is this from? |
I have taken the idea from O'Brien and Castelloe for their odds calculation. To be honest, I am not sure this has ever been addressed in the literature since sans the Kerby (2014) citation I rarely see the paired samples case mentioned. My rationale for the adjustment is two-fold.
Notice how the divergent the interpretation would be from the
Again, just a thought (and an opinion), but it just seems wrong to me that 10 ties and 2 positive values would give r_{rb} = 1 |
Yes, I definitely agree with this. However, I am not familiar enough with rank based measures. Tagging @strengejacke and @bwiernik (who I believed implemented the current CI methods). From what I can see in Also, @arcaldwell49 something is off with your code I think? aarons_rbs <- function(z) {
# Run through my "ties" calculations
Ry <- effectsize:::.safe_ranktransform(z, sign = TRUE, verbose = verbose)
Ry0 <-ifelse(is.na(Ry),1,0)
Ry <- stats::na.omit(Ry)
n <- length(z)
S <- (n * (n + 1) / 2)
U1 <- sum(Ry[Ry > 0], na.rm = TRUE) + 0.5*sum(Ry0[Ry0 == 1], na.rm = TRUE)
U2 <- -sum(Ry[Ry < 0], na.rm = TRUE) + -0.5*sum(Ry0[Ry0 == 1], na.rm = TRUE)
u_ <- U1 / S
f_ <- U2 / S
u_ - f_
}
z <- c(-1, rep(0,9),1,1)
aarons_rbs(z)
#> [1] 0.1410256
aarons_rbs(-z) # should be the same, but negative
#> [1] 0.08974359 Created on 2022-09-29 by the reprex package (v2.0.1) |
This comment was marked as outdated.
This comment was marked as outdated.
Okay, really going down the rabbit hole now. Stata documentation is very helpful https://www.stata.com/manuals/rsignrank.pdf I will dig into it a bit further. |
I can't remember having to do anything with this, but I can take a closer look |
Okay, two possible solutions from Sal Mangiafico's rcompanion package http://rcompanion.org/handbook/F_02.html
So the adaptation is quite easy for
Thoughts? |
This seems reasonable, but I do worry that this will make the effect size incompatible with the results from @bwiernik? Would this affect the current implementation of CIs? |
For paired samples (or one-sample), the rank-biserial correlation gives a (seemingly) odd result when there are ties with the
mu
argument. For example (code below), if I use thesleep
data set there will be 1 tie between the paired comparisons therefore, in my opinion, the effect size, or probability of superiority, should not be -1.00 or 0%. Is there any particular reason for this?My feeling is that with
.r_rbs
should actually be the following for paired samples.For this exact example, it provides the correct result (again, just my opinion).
The text was updated successfully, but these errors were encountered: