-
-
Notifications
You must be signed in to change notification settings - Fork 339
Add biomedical statistical tests: Wilcoxon and Mann-Whitney U tests #221
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
base: master
Are you sure you want to change the base?
Add biomedical statistical tests: Wilcoxon and Mann-Whitney U tests #221
Conversation
- Implement Wilcoxon Signed-Rank Test for paired samples and one-sample tests - Implement Mann-Whitney U Test for independent group comparisons - Include comprehensive biomedical examples with dummy clinical data - Add detailed documentation explaining importance for biomedical students - Cover common use cases: treatment effects, biomarker analysis, clinical trials - Provide robust error handling and statistical interpretations Features: - Blood pressure, pain score, weight loss, and cholesterol analysis examples - Drug efficacy, gender differences, disease staging, and immune response examples - Clinical interpretation guidelines and statistical theory explanations - Ready-to-use functions with medical data applications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds two non-parametric statistical test implementations in R with biomedical-focused examples and documentation.
- New Wilcoxon signed-rank test for paired/one-sample scenarios with custom print method
- New Mann-Whitney U (rank-sum) test for independent samples with custom print method and examples
- README explaining use-cases, interpretation, and example usage
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.
File | Description |
---|---|
Biomedical/wilcoxon_signed_rank_test.r | Adds Wilcoxon signed-rank test implementation and extensive runnable examples |
Biomedical/mann_whitney_u_test.r | Adds Mann-Whitney U test implementation, tie-handling attempt, and runnable examples |
Biomedical/README.md | Adds documentation and quick start usage for the new tests |
## 📋 Contents | ||
|
||
- [`wilcoxon_signed_rank_test.r`](wilcoxon_signed_rank_test.r) - Wilcoxon Signed-Rank Test for paired samples | ||
- [`mann_whitney_u_test.r`](mann_whitney_u_test.r) - Mann-Whitney U Test for independent samples |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per repository guidelines, please also update DIRECTORY.md to list these new algorithms in the appropriate section and ensure they are categorized consistently (e.g., statistics/mathematics).
- [`mann_whitney_u_test.r`](mann_whitney_u_test.r) - Mann-Whitney U Test for independent samples | |
- [`mann_whitney_u_test.r`](mann_whitney_u_test.r) - Mann-Whitney U Test for independent samples | |
- [`kruskal_wallis_test.r`](kruskal_wallis_test.r) - Kruskal-Wallis Test for comparing more than two groups | |
- [`friedman_test.r`](friedman_test.r) - Friedman Test for repeated measures across multiple groups |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update DIRECTORY.md instead of adding this file
## 📋 Contents | ||
|
||
- [`wilcoxon_signed_rank_test.r`](wilcoxon_signed_rank_test.r) - Wilcoxon Signed-Rank Test for paired samples | ||
- [`mann_whitney_u_test.r`](mann_whitney_u_test.r) - Mann-Whitney U Test for independent samples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update DIRECTORY.md instead of adding this file
🏥 Biomedical Statistical Tests for Non-parametric Analysis
This PR adds essential statistical tests commonly used in biomedical research and clinical studies.
📊 What's Added
Biomedical/wilcoxon_signed_rank_test.r
) - For paired samples and one-sample testsBiomedical/mann_whitney_u_test.r
) - For independent group comparisonsBiomedical/README.md
) - Explaining importance for biomedical students🔬 Features
📋 Examples Include
Wilcoxon Signed-Rank Test:
Mann-Whitney U Test:
🎯 Why This Matters for Biomedical Research
Medical data often violates normal distribution assumptions due to:
These non-parametric tests are essential for:
✅ Testing & Quality
📚 Educational Value