Skip to content
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

Moore-rayleigh #215

Closed
wants to merge 4 commits into from
Closed

Moore-rayleigh #215

wants to merge 4 commits into from

Conversation

J-Wall
Copy link

@J-Wall J-Wall commented Dec 1, 2021

This PR implements the Moore's modified Rayleigh test described in Moore, B. R. (1980). A modification of the Rayleigh test for vector data. Biometrika, 67(1), 175-180. Addresses part of #214. I've tried to follow your style for code and documentation, and I've included tests based on R* values obtained from the Oriana circular statistics program, and manually calculated p-values.

This test is slightly obscure (in fact, I couldn't find it in any other statistics library...) although it's used a fair bit in animal migration research. The lack of an open-source implementation was bugging me, so I thought I would contribute to an existing library rather than start my own. Cheers!

@raphaelvallat
Copy link
Owner

Hi @J-Wall!

Thanks so much for this. Really clean PR! Two comments after a quick review:

  1. For unit testing, can you get higher float precision than 3 decimals? I'm not familiar at all with the Oriana software.

  2. Should we combine the circ_moore_rayleigh and circ_rayleigh into a single function? e.g. the Moore's method could be specified as an optional parameter to the main circ_rayleigh function? I'd much prefer this option rather than burdening Pingouin's API with a very rare function.

Thanks,
Raphael

@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #215 (5475d88) into master (cc5d687) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   99.02%   98.93%   -0.09%     
==========================================
  Files          19       19              
  Lines        3280     3292      +12     
  Branches      529      529              
==========================================
+ Hits         3248     3257       +9     
- Misses         16       18       +2     
- Partials       16       17       +1     
Impacted Files Coverage Δ
pingouin/circular.py 100.00% <100.00%> (ø)
pingouin/plotting.py 96.48% <0.00%> (-0.88%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc5d687...5475d88. Read the comment docs.

@raphaelvallat
Copy link
Owner

I am closing this PR since there has not been any activity in several months. Feel free to reopen. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implemetation of Mardia-Watson-Wheeler test and Moore's Modified Rayleigh test for circular data
2 participants