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 \gamma, however, is obtained by a permutation procedure. Let \nu = 1: n be the vector of original sample indices of the sample for Y labels and \hat{\rho}_g(\alpha) = \hat{\rho}(\nu;\alpha). Let \pi(\nu) denote a permutation of the elements of \nu and the corresponding \hat{\rho}_g(\pi;\alpha) is computed. Under the {\cal H}_0, \hat{\rho}_g(\nu) and \hat{\rho}_g(\pi;\alpha) are identically distributed for every permutation \pi of \nu. Hence, based on M permutations, the critical value q_{\gamma} is estimated by the (1-\gamma)100\% sample quantile of \hat{\rho}_g(\pi_m;\alpha), m=1,...,M. Usually 100\leq M\leq 1000 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

PermutationTest

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') 

[Package GiniDistance version 0.1.1 Index]