We propose a new method to test conditional independence of two real random variables and conditionally on an arbitrary third random variable . %with representing conditional distribution functions, The partial copula is introduced, defined as the joint distribution of and . We call this transformation of into the partial copula transform. It is easy to show that if and are continuous for any given value of , then implies . Conditional independence can then be tested by (i) applying the partial copula transform to the data points and (ii) applying a test of ordinary independence to the transformed data. In practice, and will need to be estimated, which can be done by, e.g., standard kernel methods. We show that under easily satisfied conditions, and for a very large class of test statistics for independence which includes the covariance, Kendall's tau, and Hoeffding's test statistic, the effect of this estimation vanishes asymptotically. Thus, for large samples, the estimation can be ignored and we have a simple method which can be used to apply a wide range of tests of independence, including ones with consistency for arbitrary alternatives, to test for conditional independence. A simulation study indicates good small sample performance. Advantages of the partial copula approach compared to competitors seem to be simplicity and generality.
View on arXiv