JuliaStats / HypothesisTests.jl

Hypothesis tests for Julia
MIT License
295 stars 87 forks source link

Use `StatsAPI.pvalue` + `StatsAPI.HypothesisTest` #297

Closed devmotion closed 1 year ago

devmotion commented 1 year ago

Fixes #290.

The PR requires https://github.com/JuliaStats/Distributions.jl/pull/1719. Keeping these definitions in HypothesisTests would be type piracy when pvalue is not owned by HypothesisTests anymore. Alternatively, the definitions for UnivariateDistributions could be moved to an internal _pvalue function but IMO they seem more generally useful, so I moved them to Distributions.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 98.52% and project coverage change: -0.04 :warning:

Comparison is base (a1713cf) 93.78% compared to head (b20efcd) 93.75%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #297 +/- ## ========================================== - Coverage 93.78% 93.75% -0.04% ========================================== Files 28 28 Lines 1739 1729 -10 ========================================== - Hits 1631 1621 -10 Misses 108 108 ``` | [Impacted Files](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats) | Coverage Δ | | |---|---|---| | [src/white.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL3doaXRlLmps) | `97.43% <50.00%> (ø)` | | | [src/HypothesisTests.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL0h5cG90aGVzaXNUZXN0cy5qbA==) | `78.57% <100.00%> (-4.77%)` | :arrow_down: | | [src/anderson\_darling.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL2FuZGVyc29uX2Rhcmxpbmcuamw=) | `88.43% <100.00%> (ø)` | | | [src/augmented\_dickey\_fuller.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL2F1Z21lbnRlZF9kaWNrZXlfZnVsbGVyLmps) | `93.15% <100.00%> (ø)` | | | [src/bartlett.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL2JhcnRsZXR0Lmps) | `100.00% <100.00%> (ø)` | | | [src/binomial.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL2Jpbm9taWFsLmps) | `92.22% <100.00%> (+0.55%)` | :arrow_up: | | [src/box\_test.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL2JveF90ZXN0Lmps) | `93.75% <100.00%> (ø)` | | | [src/breusch\_godfrey.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL2JyZXVzY2hfZ29kZnJleS5qbA==) | `100.00% <100.00%> (ø)` | | | [src/circular.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL2NpcmN1bGFyLmps) | `77.77% <100.00%> (ø)` | | | [src/correlation.jl](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats#diff-c3JjL2NvcnJlbGF0aW9uLmps) | `100.00% <100.00%> (ø)` | | | ... and [15 more](https://app.codecov.io/gh/JuliaStats/HypothesisTests.jl/pull/297?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaStats) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

devmotion commented 1 year ago

Tests pass with the latest release of Distributions.

devmotion commented 1 year ago

Bump :slightly_smiling_face: