Giter Site home page Giter Site logo

partialdistancecorrelation's Introduction

partialDistanceCorrelation

This matlab package provides several ways to perform partial distance correlation. The scripts in the main directory (mainly pdc.m) perform partial bias corrected distance correlation between two variables of interest and any number of variables that the relationship should be conditioned on. This is achieved by applying the recursive formula for partial correlation, but to bias corrected distance correlation coefficients. The recursive formula is implemented to handle any nth order partial correlation. P-values are generated in the same way as for bias corrected distance correlation (chi-square distribution). In addition, a linear partial correlation can be performed using the same recursive formula (i.e., for comparison). This can also be compared to matlab's internal partialcorr (also output by pdc.m), which shows very small (i.e., rounding, precision) deviations with higher order partial correlations (3+).

You can now use pdcPerm.m to perform a permutation based test of the significance of the bias corrected partial distance correlation (pdc). The y variable is permuted and the p-value is computed as one-tail (i.e., proportion of times permuted pdc coefficient exceeds actual pdc coefficient). In other words, the null is whether the pdc coefficient is higher than chance level pdc.

You can also use pdcPerm even if you don't want to do a permutation analysis. I recommend this as pdcPerm will clean up NaNs for you and check variables.

Note, pdcPerm uses a different method for computing partial correlation, but will produce the same output as dcor in python (see: https://dcor.readthedocs.io/en/latest/index.html)

For more information, see: Székely, G. J., & Rizzo, M. L. (2014). Partial distance correlation with methods for dissimilarities. The Annals of Statistics, 42(6), 2382-2412. Also see these slides: https://stat.wisc.edu/wp-content/uploads/sites/870/2020/03/SzekelyGabor.pdf

In ./permDCwithPartialCorrelation non-bias corrected partial distance correlation is computed and a permutation analysis is used to obtain p-values. partialdistcorr.m can compute the distance correlation after linear regression of control variables from two variables of interest. As such, this package does not consider nonlinear relationships between control variables and variables of interest.

Alex Teghipco // [email protected]

partialdistancecorrelation's People

Contributors

alexteghipco avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.