Skip to content

Partial Correlation Using Covariance vs OLS methods? #273

Answered by raphaelvallat
adam2392 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @adam2392,

Pingouin's partial correlation used to rely on the residuals of linear regression. We changed it in Pingouin 0.4.0. Copy-pasting the changelog below:

Major refactoring of pingouin.partial_corr(), which now uses the same method as the R ppcor package, i.e. based on the inverse covariance matrix rather than the residuals of a linear regression. This new approach is faster and works better in some cases (such as Spearman partial correlation with binary variables, see issue 147). One caveat is that only the Pearson and Spearman correlation methods are now supported in partial/semi-partial correlation.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by raphaelvallat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants