  We propose a new method named the Conditional Randomization Rank Test (CRRT)
for testing conditional independence of a response variable Y and a covariate
variable X, conditional on the rest of the covariates Z. The new method
generalizes the Conditional Randomization Test (CRT) of [CFJL18] by exploiting
the knowledge of the conditional distribution of X|Z and is a conditional
sampling based method that is easy to implement and interpret. In addition to
guaranteeing exact type 1 error control, owing to a more flexible framework,
the new method markedly outperforms the CRT in computational efficiency. We
establish bounds on the probability of type 1 error in terms of total variation
norm and also in terms of observed Kullback-Leibler divergence when the
conditional distribution of X|Z is misspecified. We validate our theoretical
results by extensive simulations and show that our new method has considerable
advantages over other existing conditional sampling based methods when we take
both power and computational efficiency into consideration.
