Skip to content

Add Cliff's delta effect size to two-group Wilcoxon results - #14

Open
0xMuluh wants to merge 10 commits into
develfrom
cliff
Open

0xMuluh wants to merge 10 commits into
develfrom
cliff

Conversation

@0xMuluh

@0xMuluh 0xMuluh commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Adds getEffectSize(), which calculates Cliff's delta or Cohen's d (effsize) for each feature and pair of groups, and an effect.size option to getWilcoxonTest() that adds it to the results. Not supported for paired tests.

Closes #12

@TuomasBorman TuomasBorman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be own function. Then you could have a flag in getWilcoxon to calculate also effect size.

By doing that, we could use it also elsewhere where needed.

Comment thread R/utils.R Resolved
Comment thread R/utils.R Resolved
Comment thread R/utils.R Resolved
Comment thread R/utils.R Resolved
Comment thread R/utils.R Resolved

@TuomasBorman TuomasBorman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, check sugestions

Comment thread R/utils.R Resolved
@TuomasBorman

Copy link
Copy Markdown
Contributor

Sorry the review was a bit messy. This was the idea:

getEffectSize.R

getEffectSize <- function(tse, formula, method){
    df <- .get_data(tse)
    .calculate_effsize(df, formula, method)
}

.calculate_effsize <- (df, formula, method = c("cliff", "cohen"){
     # Calculate effect size with effsize package
}
getWilcoxonTest.R

getWilcoxonTest <- function(tse, formula){
   .calculate_wilcoxon()
   calculate_effsize()
   # Merge
}

0xMuluh and others added 6 commits April 30, 2026 12:31
getEffectSize() calculates Cliff's delta or Cohen's d with effsize for
each feature and pair of groups. getWilcoxonTest(effect.size = ) adds
it to the test results. Replaces the earlier internal implementation,
as suggested in review.
@0xMuluh

0xMuluh commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Reworked as you suggested: getEffectSize(tse, formula, method = c("cliff", "cohen")) in its own file, using effsize. getWilcoxonTest(effect.size = ) calls the same internal function and joins the result. rownames_filter is gone, and the column is effsize, so it is the same for both methods.

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.

Cliff's delta

2 participants