The partial copula provides a method for describing the dependence between
two random variables X and Y conditional on a third random vector Z in
terms of nonparametric residuals U1β and U2β. This paper develops a
nonparametric test for conditional independence by combining the partial copula
with a quantile regression based method for estimating the nonparametric
residuals. We consider a test statistic based on generalized correlation
between U1β and U2β and derive its large sample properties under
consistency assumptions on the quantile regression procedure. We demonstrate
through a simulation study that the resulting test is sound under complicated
data generating distributions. Moreover, in the examples considered the test is
competitive to other state-of-the-art conditional independence tests in terms
of level and power, and it has superior power in cases with conditional
variance heterogeneity of X and Y given Z