feat(stats): implement additional statistical tests #17#10918
feat(stats): implement additional statistical tests #17#10918Sumithraju wants to merge 7 commits intostdlib-js:developfrom
Conversation
Add `@stdlib/stats/spearman-test` which computes a Spearman rank correlation test between paired samples. The Spearman rank correlation coefficient is a non-parametric measure of rank correlation that assesses how well the relationship between two variables can be described using a monotonic function. The implementation closely follows the existing `pcorrtest` package patterns and supports: - Two-sided, less, and greater alternative hypotheses - Custom significance level (alpha) - Testing against a non-zero null correlation (rho) - Confidence intervals via Fisher's z transform - Pretty-printed output via `.print()` method - Tied rank handling via average rank assignment Ref: stdlib-js/google-summer-of-code#17
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
- Update all copyright years from 2018 to 2026 - Align examples with pcorrtest pattern (use rnorm, proper var declarations) - Align benchmarks with pcorrtest pattern (multiple benchmark cases) - Update README to match pcorrtest structure (sections, links, eslint directive)
Add missing docs/types/test.ts, docs/repl.txt, and fix docs/types/index.d.ts to align with stdlib conventions (NumericArray types, JSDoc annotations).
- Add <!-- run-disable --> before console.log(out.print()) block to prevent 'out is not defined' error when blocks run independently - Replace new Array(300) with [] and push() pattern in README examples and examples/index.js to fix no-new-array ESLint rule violation - Replace new Array(n) with [] in ranks.js for consistency - Use // ... instead of ... in inline result comments
|
infrastructure err not in my code how do i fix it |
Description
This pull request:
@stdlib/stats/spearman-testwhich computes a Spearman rank correlation test between paired samplesThe Spearman rank correlation coefficient is a non-parametric measure of rank correlation that assesses how well the relationship between two variables can be described using a monotonic function.
The implementation closely follows the existing
pcorrtestpackage patterns and supports:.print()methodRelated Issues
This pull request has the following related issues:
Questions
No.
Other
@stdlib/stats/pcorrtestrho = 0and Fisher's z transform whenrho != 0, consistent with R'scor.test(method = "spearman")test/fixtures/r/runner.Rfor cross-validationChecklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was scaffolded with AI assistance . All code was reviewed and validated manually by the author.
@stdlib-js/reviewers