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.
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)