ci: Conditional independence test with copula entropy
Description
Testing conditional independence between (x,y) conditional on z with copula entropy.
Usage
ci(x,y,z,k=3,dt=2)
Value
The function returns the value of the test statistic of conditional independence.
Arguments
x
the data with 1 row
y
the data with 1 row
z
the data with 1 row
k
kth nearest neighbour, default = 3
dt
the type of distance between samples, 1 for Eclidean distance; 2 for Maximum distance
Details
This program involves testing conditional independence between (x,y) conditional on z with copula entropy nonparametrically. It was proposed in Ma (2019).
The algorithm composes of two simple steps: estimating three copula entropy terms with copent and then calculate the test statistic.
The argument x,y,z are for the data with 1 row and same length as samples from random variables. The argument k and dt is used in the kNN method for estimating entropy. k is for the kth nearest neighbour (default = 3) and dt is for the type of distance between samples which has currently two value options (1 for Eclidean distance, and 2(default) for Maximum distance).
References
Ma, Jian. Estimating Transfer Entropy via Copula Entropy. arXiv preprint arXiv:1910.04375, 2019.