CriticalValue {GiniDistance} | R Documentation |
Find a critical value by permutation test of dependence between X and Y using kernel (Gini) distance covariance or correlation statistics
Description
Find a critical value by permutation test using variance of kernel (Gini) distance covariance or correlation statistics, in which Xs are quantitative, Y are categorical, sigma is kernel standard deviation, alpha is an exponent on Euclidean distance and returns the critical value of the measures of dependence.
Usage
CriticalValue(x, y, sigma, alpha, level, M = 1000, method)
Arguments
x |
data |
y |
label of data or univariate response variable |
sigma |
kernel standard deviation |
alpha |
exponent on Euclidean distance, in (0,2] |
level |
significance level of the test, the default value = 0.05 |
M |
number of permutations |
method |
string name of the method for permutation test, e.g. gCov |
Details
CriticalValue
compute the critical value of a dependence test of a kernel (Gini) distance covariance or correlation statistics.
It is a self-contained R function returning the critical value of the measure of dependence statistics.
The critical value of the test of significance level , however, is obtained by a permutation procedure.
Let
be the vector of original sample indices of the sample for
labels and
.
Let
denote a permutation of the elements of
and the corresponding
is computed.
Under the
,
and
are identically distributed for every permutation
of
.
Hence, based on
permutations, the critical value
is estimated by the
sample
quantile of
,
. Usually
is sufficient
for a good estimation on the critical value.
See PermutationTest
for a test of multivariate independence
based on the (Gini) distance statistic.
Value
CriticalValue
returns return the critical value of the measures of the dependence of the permutation test of a specified function
See Also
Examples
n = 50
x <- runif(n)
y <- c(rep(1,n/2),rep(2,n/2))
CriticalValue(x, y, sigma=1, alpha=2, level=0.04, M = 1000, method='KgCov')