gCor {GiniDistance} | R Documentation |
Gini Distance Covariance and Correlation Statistics
Description
Computes Gini distance covariance and correlation statistics, in which Xs are quantitative, Y are categorical, alpha is exponent on the Euclidean distance and returns the measures of dependence.
Usage
gCor(x, y, alpha)
Arguments
x |
data |
y |
label of data or univariate response variable |
alpha |
exponent on Euclidean distance, in (0,2) |
Details
gCor
compute Gini distance correlation statistics.
It is a self-contained R function returning a measure of dependence statistics.
The sample size (number of rows) of the data must agree with the length of the label vector, and samples must not contain missing values. Arguments
x
, y
are treated as data and labels. alpha
if missing by default is 1, otherwise it is exponent on the Euclidean distance.
Suppose a sample data for
available. The sample counterparts can be easily computed. Let
be the index set of sample points with
, then
is estimated by the sample proportion of that category, that is,
where
is the number of elements in
. With a given
, a point estimator of
is given as follows.
Value
gCor
returns the sample Gini distance covariacne and correlation between x
and y
.
References
Dang, X., Nguyen, D., Chen, Y. and Zhang, J. (2019). A new Gini correlation between quantitative and qualitative variables. Submitted to Journal of American Statistics Association.
See Also
Examples
x <- iris[,1:4]
y <- unclass(iris[,5])
gCor(x, y, alpha = 1)