Skip to content
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

Adding Wilcoxon Rank-Sum Tests #25

Merged
merged 14 commits into from
Feb 9, 2024
Merged

Adding Wilcoxon Rank-Sum Tests #25

merged 14 commits into from
Feb 9, 2024

Conversation

ddsjoberg
Copy link
Collaborator

@ddsjoberg ddsjoberg commented Feb 1, 2024

What changes are proposed in this pull request?

  • Added ard_wilcoxtest() and ard_paired_wilcoxtest()

Related #42
Related #39


Reviewer Checklist (if item does not apply, mark is as complete)

  • Ensure all package dependencies are installed: devtools::install_dev_deps()
  • PR branch has pulled the most recent updates from master branch: usethis::pr_merge_main()
  • If a bug was fixed, a unit test was added.
  • Run pkgdown::build_site(). Check the R console for errors, and review the rendered website.
  • Code coverage is suitable for any new functions/features: devtools::test_coverage()
  • usethis::use_spell_check() runs with no spelling errors in documentation

When the branch is ready to be merged:

  • Update NEWS.md with the changes from this pull request under the heading "# cards (development version)". If there is an issue associated with the pull request, reference it in parentheses at the end update (see NEWS.md for examples).
  • Increment the version number using usethis::use_version(which = "dev")
  • Run usethis::use_spell_check() again
  • Approve Pull Request
  • Merge the PR. Please use "Squash and merge".

@ddsjoberg ddsjoberg changed the title adding Wilcoxon Rank-Sum test Adding Wilcoxon Rank-Sum Tests Feb 1, 2024
Copy link
Contributor

github-actions bot commented Feb 1, 2024

Unit Tests Summary

 1 files   4 suites   1s ⏱️
 4 tests  4 ✅ 0 💤 0 ❌
12 runs  10 ✅ 2 💤 0 ❌

Results for commit 0c4da80.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 1, 2024

badge

Code Coverage Summary

Filename              Stmts    Miss  Cover    Missing
------------------  -------  ------  -------  ---------
R/ard_ttest.R            78       0  100.00%
R/ard_wilcoxtest.R       83       0  100.00%
TOTAL                   161       0  100.00%

Diff against main

Filename              Stmts    Miss  Cover
------------------  -------  ------  --------
R/ard_ttest.R           -10       0  +100.00%
R/ard_wilcoxtest.R      +83       0  +100.00%
TOTAL                   +73       0  +100.00%

Results for commit: 0c4da80

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
ard_wilcoxtest 👶 $+0.00$ $+3$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
ard_wilcoxtest 👶 $+0.00$ ard_paired_wilcoxtest_works
ard_wilcoxtest 👶 $+1.02$ ard_wilcoxtest_works

Results for commit fc63f9c

♻️ This comment has been updated with latest results.

@ddsjoberg ddsjoberg mentioned this pull request Feb 6, 2024
10 tasks
@ddsjoberg ddsjoberg added the sme label Feb 6, 2024
R/ard_wilcoxtest.R Outdated Show resolved Hide resolved
@ddsjoberg ddsjoberg added the ARD label Feb 8, 2024
@Melkiades Melkiades self-assigned this Feb 9, 2024
R/ard_wilcoxtest.R Outdated Show resolved Hide resolved
R/ard_wilcoxtest.R Outdated Show resolved Hide resolved
R/ard_wilcoxtest.R Outdated Show resolved Hide resolved
Comment on lines +26 to +27
#' The data are then passed as
#' `wilcox.test(x = data_wide[[<by level 1>]], y = data_wide[[<by level 2>]], paired = TRUE, ...)`.
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not allow wrapping in docs, maybe it should be on the same line somehow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When the help files are rendered, it doesn't break the line mid-code. But if you make the window wide enough it does all appear on one line.

image

Am I addressing your comment?

Copy link
Contributor

Choose a reason for hiding this comment

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

just wondering if it was intentional that the first breaks mid-code while the second does not

ddsjoberg and others added 3 commits February 9, 2024 09:52
Co-authored-by: Davide Garolini <[email protected]>
Signed-off-by: Daniel Sjoberg <[email protected]>
Co-authored-by: Davide Garolini <[email protected]>
Signed-off-by: Daniel Sjoberg <[email protected]>
Co-authored-by: Davide Garolini <[email protected]>
Signed-off-by: Daniel Sjoberg <[email protected]>
Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

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

Only minor questions from my side. Generally, it is good to go! Thanks Daniel ^^

ps: I really appreciate testing the output directly with the stats:: function. I was suggesting doing something similar some time ago to start walking the long road of addressing double programming and QCing. Going beyond this would be testing stats itself...

@ddsjoberg ddsjoberg merged commit 1c75c5f into main Feb 9, 2024
22 checks passed
@ddsjoberg ddsjoberg deleted the ard-wilcoxtest branch February 9, 2024 18:32
)
}

#' Convert t-test to ARD
Copy link
Contributor

Choose a reason for hiding this comment

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

Just found this. It should be wilcox test @ddsjoberg

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh goodness, thank you!

#' @inheritParams stats::wilcox.test
#' @param by (`string`)\cr by column name
#' @param variable (`string`)\cr variable column name
#' @param ... passed to `wilcox.test(...)`
Copy link
Contributor

Choose a reason for hiding this comment

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

missing stats::

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it's ok to keep it like this, since it's essentially base R

This was referenced Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants