Skip to content

Commit

Permalink
ENH: stats: add nonparametric one-sample quantile test and CI (scipy#…
Browse files Browse the repository at this point in the history
…12680)

* mwe of the function, tests added but does not work yet

* added self to contrib list"

* added function name to __init__ to appear in the online doc

* function is ready, docstring and tests to finish

* ENH: added non-parametric confidence intervals for quantiles into scipy.stats

* fixed docstring

* fixed pep8 typos and doctest typos

* improved efficiency by using binom.isf
fixed minor documentation things

* added None return to the docstring

* fixed docstring bug

* docstring updates

* reverted content of THANKS.txt

* added reference to a related R package

* fixed doctring lines being too long

* corrected line length issues

* update version number

Co-authored-by: Matt Haberland <[email protected]>

* corrected typo in docstring

Co-authored-by: Matt Haberland <[email protected]>

* corrected typo in doctring

Co-authored-by: Matt Haberland <[email protected]>

* typo in doctring

Co-authored-by: Matt Haberland <[email protected]>

* pass on docstring

* Updated unit test for confint_quantile

* MAINT: stats: confint: revert undesired changes to stats.py

* DOC: stats: confint_quantile: add whitespace back to docstrings

* DOC: stats: confint_quantile: add carriage return back to docstringsUpdate scipy/stats/stats.py

Co-authored-by: Matt Haberland <[email protected]>

* DOC: stats: confint_quantile: add carriage return back to docstringsUpdate scipy/stats/stats.py

Co-authored-by: Matt Haberland <[email protected]>

* DOC: stats: confint_quantile: add carriage return back to docstringsUpdate scipy/stats/stats.py

Co-authored-by: Matt Haberland <[email protected]>

* DOC: fixed docstring test

* DOC: fixed doctest

* DOC: fixed doctest

* MAINT: added back the confint code

* MAINT: stats.confint_quantile: fix merge issues

* STY: stats.confint_quantile: PEP8

* ENH: stats.quantile_test: add quantile test and move CI to method of result object

[skip ci]

* MAINT: stats.quantile_test: adjust (correct?) `confidence_interval`
[skip ci]

* DOC: stats.quantile_test: update documentation

[skip azp] [skip actions]

* FIX: correct p-values for the Quantile test

* some PEP8 formatting

Co-authored-by: Matt Haberland <[email protected]>

* comment update

Co-authored-by: Matt Haberland <[email protected]>

* Cleanup

Co-authored-by: Matt Haberland <[email protected]>

* cleanup

Co-authored-by: Matt Haberland <[email protected]>

* Fixed comment typo

Co-authored-by: Matt Haberland <[email protected]>

* doc typo

Co-authored-by: Matt Haberland <[email protected]>

* doc typo

Co-authored-by: Matt Haberland <[email protected]>

* added IV test for quantile_test

* wip tests for QuantileTest

* cleaned up the alternative IV test

* unitests for QuantileTest

* PEP8 pass

* added example for the confidence_interval method

* Apply suggestions from code review

* updated Notes section of the docstring

* added examples

* TST: stats.quantile_test: adjust tests

* Fix typo in the example

Co-authored-by: Matt Haberland <[email protected]>

* Text improvement in the example

Co-authored-by: Matt Haberland <[email protected]>

* Improvement example text

Co-authored-by: Matt Haberland <[email protected]>

* Simplification iv test

Co-authored-by: Matt Haberland <[email protected]>

* Fixing typo in comments

Co-authored-by: Matt Haberland <[email protected]>

* MAINT: stats.quantile_test: rewriting to follow Conover's book [skip ci]

Co-authored-by: Matt Haberland <[email protected]>

* TST: stats.quantile_test: use output of R implem in test  [skip ci]

* MAINT:stats.quantile_test: using dataclass instead of tuple_bunch [skip ci]

* TST: stats.quantile_test: adding Conover examples as tests [skip ci]

* MAINT: stats.quantile_test: more adjustments per review

* TST: stats.quantile_test: strengthen test of CIs vs p-values

* DOC: Docstring updates + change result attributes

DOC: Sync docstring for test with actual implementation

DOC: Indent hypotheses [skip actions]

DOC: Fix docstring formatting [skip actions]

DOC: Try to fix another sphinx issue [skip actions]

TST: Fix hardcoded value in doctest [skip actions]

TST: More fix for doctest [skip actions]

DOC: More thrashing [skip actions]

DOC: sphinx was confused by `p`th [skip actions]

DOC: try to deal with more sphinx weirdness [skip actions]

DOC: Change pth to latex [skip actions] [skip cirrus]

DOC: Make p-value consistent in docs [skip actions] [skip cirrus]

DOC: More docstring cleanup [skip actions] [skip cirrus]

Update scipy/stats/_stats_py.py

Co-authored-by: Matt Haberland <[email protected]>

Update scipy/stats/_stats_py.py [skip actions] [skip cirrus]

Co-authored-by: Matt Haberland <[email protected]>

Remove blank line (squash)

MAINT: Make result contain only one statistic + info

MAINT: Bring some lines to 79 chars or less

MAINT: Fix statistic not set for alternative two-side

MAINT: Update statistic_type -> statistic_sign

TST: Fix doctests [skip actions] [skip cirrus]

MAINT: Change to statistic_type 1, 2

MAINT: Fix formatting in tests

Apply suggestions from code review [skip cirrus] [skip actions]

Co-authored-by: Matt Haberland <[email protected]>

DOC: Documentation fixes [skip actions] [skip cirrus]

DOC: documentation fixes [skip actions] [skip cirrus]

DOC: More doc fixes [skip actions] [skip cirrus]

DOC: Adjust formatting for bullet list [skip actions] [skip cirrus]

DOC: Adjust subscript to superscript in pth [skip cirrus] [skip actions]

DOC: Remove extraneous blank line [skip actions] [skip cirrus]

DOC: Unbold hypotheses [skip cirrus] [skip actions]

* DOC: More doc fixes [skip actions] [skip cirrus]

---------

Co-authored-by: Matt Haberland <[email protected]>
Co-authored-by: Albert Steppi <[email protected]>
  • Loading branch information
3 people authored Aug 4, 2023
1 parent 382b824 commit 64be173
Show file tree
Hide file tree
Showing 3 changed files with 603 additions and 5 deletions.
1 change: 1 addition & 0 deletions scipy/stats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
ttest_1samp
binomtest
quantile_test
skewtest
kurtosistest
normaltest
Expand Down
Loading

0 comments on commit 64be173

Please sign in to comment.