Comments (8)
Hello @raphaelvallat,
Sure, I'm working on it. While researching, I think I found how the extra metrics could be explicit on the results.
The test can be performed with a few different values for lambda_
, as seen here. And for each value of lambda_
, there should be a different pair of χ² and p-value.
Wrapping it up, pg.chi2
could return tests for each lambda_
(not just for the Pearson's) as well as the degree of freedom and the contingency table with expected frequencies.
I'll be back soon with the Jupyter Notebook.
from pingouin.
Btw if you prefer to work on a PR of your own, please feel free to fork the develop branch and submit it when you're done ;-)
That'd be great. I'm just a bit busy lately, but I'm eager to participate and help :D
from pingouin.
Working on it and learning a lot! (arthurpaulino@41f176f)
I'll implement the tests tomorrow. Any feedback is welcome 😃
from pingouin.
This looks absolutely great @arthurpaulino ! Amazing job, can't wait to try it out!
from pingouin.
PS: you also need to add the datasets to the MANIFEST.in file, otherwise the example dataset will not be installed with pip!
Thanks!
from pingouin.
Hi @arthurpaulino!
Thank you for your message! I don't use this test very often, but I'd be happy to implement it in the next release (or more realistically the one after the next). It would be very helpful if you could share a Jupyter Notebook showing how you would typically do this test using Pandas + SciPy, as well as the kind of metrics / information that you would be interested in having as an output of the pg.pearson_chi2
function.
Best,
Raphael
from pingouin.
Alright, that took a while. It was a good learning experience for me.
I tried to keep the example as minimal and organized as possible. The result is somewhat close to a final version of what gp.chi2
would look like. The notebook link is here.
It was inspired by SciPy's implementation, which is more robust and incorporates a few more checks that would be healthy in the final version of gp.chi2
, I think.
from pingouin.
Thank you @arthurpaulino, this looks great! I'm gonna look at that more in details this weekend, and hopefully should be able to include it in the next release or so then. (Btw if you prefer to work on a PR of your own, please feel free to fork the develop branch and submit it when you're done ;-))
Thanks!
from pingouin.
Related Issues (20)
- partial_corr documentation / assertion wrong HOT 3
- Update pairwise.py to function with Pandas >= 2.0.0 HOT 2
- non normal distribution error thrown when using ANCOVA HOT 1
- relimp_perc causing TypeError: unsupported operand type(s) for /: 'list' and 'int' HOT 1
- WEBSITE HOT 8
- Change solver in sklearn.LogisticRegression HOT 1
- Two new test failures fails in Fedora Rawhide HOT 3
- Chi-Square Identified Significant Groups, Now Which One is More Significant? HOT 2
- chi2_independence p-values are possibly reversed HOT 2
- Remove call to sns.despine in paired_plot
- Rename development branch HOT 1
- Potential fix for numerical instabilities for corr and partial_corr: z-normalize HOT 1
- FloatingPointError: divide by zero encountered in double_scalars when calculating t test HOT 1
- pandas > 1.5 reason? HOT 2
- Mann-Whitney U (mwu): Order of `x` and `y` determines sign of rank-biserial correlation (RBC) HOT 4
- Two-Way-ANOVA results do not show p-values. HOT 3
- How to handle categorical covariates with more than two levels in pg.partial_corr? HOT 1
- Bug in ANCOVA function (ValueError: assignment destination is read-only) HOT 1
- Feature request: add CI to ANOVA/Tukey HOT 1
- chained assignment issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pingouin.