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 ν=1:n\nu = 1: n be the vector of original sample indices of the sample for YY labels and ρ^g(α)=ρ^(ν;α)\hat{\rho}_g(\alpha) = \hat{\rho}(\nu;\alpha). Let π(ν)\pi(\nu) denote a permutation of the elements of ν\nu and the corresponding ρ^g(π;α)\hat{\rho}_g(\pi;\alpha) is computed. Under the H0{\cal H}_0, ρ^g(ν)\hat{\rho}_g(\nu) and ρ^g(π;α)\hat{\rho}_g(\pi;\alpha) are identically distributed for every permutation π\pi of ν\nu. Hence, based on MM permutations, the critical value qγq_{\gamma} is estimated by the (1γ)100%(1-\gamma)100\% sample quantile of ρ^g(πm;α)\hat{\rho}_g(\pi_m;\alpha), m=1,...,Mm=1,...,M. Usually 100M1000100\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]