refactor: Hypothesis Testing#20
Merged
Merged
Conversation
…ge_point_test and verbose for rao_spacing_test; other style changes and typos here and there
… samples input in the hypothesis tests that take list input
…rized angular_randomisation_test
…oncentration_test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The main changes this round of refactoring is to bring randomization test (for p-values) to more hypothesis tests.
New
Resampling-based p-values aka randomization test
previously only
rayleigh_testhas a resampling p-value, we now roll it out to most of the hypothesis testing (some still lack it because it doesn't make a lot of sense).Check docstring for usage. But in short:
n_resmpling=0for analytical p-value andn_resampling>0for simulation-based one.symmetry_test(method="wilcoxon"|"pewsey"), wherewilcoxonhas no simulation based p-value, onlypewseyhas;watson_test(method="uniform"|"vonmises"), whereuniformonly work for both n_resamples=0 or >0, butvonmisesonly works forn_resamples>0`.new hypothesis tests
kuiper_two_test, which matches CircStat and pycircstat's two samplekuiperandcirc_kuipertest. The originalkuiper_testmatches R's CircStats and circular'skuiperandkuiper.testwatson_test(dist="vonmises")matches circular'swatson.test(dist="vonmises")Bug fixes
omnibus_test: denim can be <=0 as m approached n/2, and we wrongly reported the pval=0 which should be 1.watson_u2_test: cumfreq assumed input data are sorted but we didn'twheeler_watson_test: didn't consider tieswallraff_test: didn't work for grouped dataall fixed.
Others
typos, style, lints, api harmonization, etc. most changes should be backward compatible.