easystats / correlation

:link: Methods for Correlation Analysis
https://easystats.github.io/correlation/
Other
435 stars 56 forks source link

semipartial distance correlation estimates #211

Open Figone opened 3 years ago

Figone commented 3 years ago

Dear all,

With energy library, I can easily calculate the distance correlation and the partial distance correlation.

I was wondering if it was possible to calculate the semi-partial distance correlation using the correlation package ? Here below my R code, if you could show me how to get the semi-partial distance correlation estimates using my R example, it would be highly appreciated.

Here below my R code :

library(energy)

A=Dataset$A

H=Dataset$H

Z=data.frame(Dataset$B,Dataset$C,Dataset$D,Dataset$E ,Dataset$F ,Dataset$G)

Distance correlation coeff. (estimate)

dcorT.test(A,H)

Partial Distance correlation coeff.

pdcor(A,H,Z)

bwiernik commented 3 years ago

correlation does not currently support semipartial distance correlations