pingouin icon indicating copy to clipboard operation
pingouin copied to clipboard

Add residuals_ attribute to pg.anova output

Open lahdjirayhan opened this issue 2 years ago • 7 comments

#118

lahdjirayhan avatar Apr 09 '22 09:04 lahdjirayhan

Codecov Report

Merging #260 (50a6bbe) into master (b1c334d) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #260   +/-   ##
=======================================
  Coverage   98.99%   99.00%           
=======================================
  Files          19       19           
  Lines        3290     3318   +28     
  Branches      527      528    +1     
=======================================
+ Hits         3257     3285   +28     
  Misses         17       17           
  Partials       16       16           
Impacted Files Coverage Δ
pingouin/parametric.py 100.00% <100.00%> (ø)

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 b1c334d...50a6bbe. Read the comment docs.

codecov[bot] avatar Apr 09 '22 09:04 codecov[bot]

Hi @lahdjirayhan,

This is great — thank you so much for the clean PR!

Two minor requests before I merge:

  1. Could you please add some unit tests in the test_parametric.py file. Specifically, we want to make sure that the obtained residuals are correct, that is, similar to what we get with another statistical program (e.g. statsmodels in Python, JAMOVI, JASP, etc).

  2. If you want, feel free to edit the changelog.rst file to update the release notes in the documentation.

Thanks again for your help, Raphael

raphaelvallat avatar Apr 12 '22 21:04 raphaelvallat

This looks great, thanks! I saw that you added the residuals for the anova, mixed_anova, welch_anova and ancova function. Would it be possible to add the residuals to the rm_anova function as well, such that all the ANOVA-related functions are covered?

Also, thanks for adding the unit testing! Can you please make sure to have at least 3 decimals in the expected (R) output?

Raphael

raphaelvallat avatar Apr 14 '22 23:04 raphaelvallat

Some of the tests currently compare up to 2 decimal places only because of the dataset used. I'll use different dataset so it will produce 3 or more decimal places.

Regarding rm_anova, unfortunately I think I can't add residuals for it. I'm not confident enough even after researching for more.

lahdjirayhan avatar Apr 15 '22 14:04 lahdjirayhan

Never mind, I think I found a way to add residuals to rm_anova. Expect more commits to come.

lahdjirayhan avatar Apr 15 '22 18:04 lahdjirayhan

Unfortunately the rm_anova2 dataset (which is used for testing rm_anova2) produces residuals up to one decimal place. (The first five entry doesn't even have decimal places).

What do you recommend me to do? @raphaelvallat

lahdjirayhan avatar Apr 15 '22 22:04 lahdjirayhan

Ping @lahdjirayhan. I'd love to release a new version of Pingouin in July. Do you think you'll have time to answer my comments before then? Thank you!

raphaelvallat avatar Jun 07 '22 17:06 raphaelvallat