In R
, I have a dataset of many variables and based on correlation matrix I see that some of the variable are correlate with the others. For simplicity, let's assume that there are three variables $X, Y, Z$ that have high pairwise correlation coefficients. But it seems that information about the variable $Y$ is already included in the variable $Z$. How can I check (in R or in Python) if $X$ is dependent on $Y$ given $Z$?
Asked
Active
Viewed 644 times
4

StatsStudent
- 10,205
- 4
- 37
- 68

user2598356
- 329
- 1
- 2
- 3
-
7You might have a look at partial correlations http://en.m.wikipedia.org/wiki/Partial_correlation e.g. implemented in R package 'ppcor'. – Michael M Nov 10 '13 at 16:38
-
For a descriptive analysis, you could look at conditional plots, in `R` that is `coplot`. Example in https://stats.stackexchange.com/questions/203494/can-i-analyze-or-model-a-conditional-correlation/368228#368228 – kjetil b halvorsen Oct 19 '18 at 15:12