Comments (3)
Hi @hoechenberger! Thanks for pointing this. I agree that we should think of a native implementation of the multi-index. This will probably require a lot of adaptations to the code. I am gonna be very busy in the next weeks so let's stick with your workaround for now and I'll try to add the multi-index support in future releases. Thanks!
from pingouin.
My current workaround:
In[3]: corr_result = pingouin.pairwise_corr(data['Result'], columns=['a', 'b'])
...: print(corr_result)
...:
/Users/hoechenberger/miniconda3/envs/QUOTE/lib/python3.7/site-packages/pingouin/effsize.py:135: RuntimeWarning: divide by zero encountered in arctanh
z = np.arctanh(stat)
/Users/hoechenberger/miniconda3/envs/QUOTE/lib/python3.7/site-packages/pingouin/power.py:618: RuntimeWarning: divide by zero encountered in arctanh
zr = np.arctanh(r) + r / (2 * (n - 1))
/Users/hoechenberger/miniconda3/envs/QUOTE/lib/python3.7/site-packages/scipy/integrate/quadpack.py:385: IntegrationWarning: The integral is probably divergent, or slowly convergent.
warnings.warn(msg, IntegrationWarning)
/Users/hoechenberger/miniconda3/envs/QUOTE/lib/python3.7/site-packages/pingouin/pairwise.py:854: RuntimeWarning: divide by zero encountered in arctanh
stats['z'] = np.arctanh(stats['r'].values)
X Y method tail n ... adj_r2 z p-unc BF10 power
0 a b pearson two-sided 5 ... 1.0 inf 0.0 -8.554 1.0
[1 rows x 13 columns]
from pingouin.
Hi @hoechenberger!
I've just added suport for multi-index columns in the pingouin.pairwise_corr function (commit 94da5e6).
This will be hopefully included in the next release. If by any chance you can give it a try on "real-data" before and report any bugs that would be greatly appreciated. Some examples are shown in the Jupyter notebook https://github.com/raphaelvallat/pingouin/blob/94da5e6495ba9218362da409e09f65c0714904bd/notebooks/04_Correlations.ipynb
Thanks!
Raphael
from pingouin.
Related Issues (20)
- 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
- pg.bayesfactor_pearson(r=-0.856, n=64, alternative="greater") returns wrong BF value
- Mann-Whitney U (mwu): the computation of rank-biserial correlation (RBC) is problematic
- How to solve RuntimeWarning: invalid value encountered in double_scalars and RuntimeWarning: Mean of empty slice. HOT 2
- Computation for Cohen's d in ttest seems to use the wrong fomula
- Effect sizes Cohens D and Hedges g with pingouin differ from R
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.