SkewTk {nnspat}R Documentation

Skewness of Cuzick and Edwards T_k Test statistic

Description

This function estimates the skewness of Cuzick and Edwards T_k test statistic under the RL hypothesis. Skewness of a random variable T is defined as E(T-\mu)^3/(E(T-\mu)^2)^{1.5} where \mu=E T.

Skewness is used for Tango's correction to Cuzick and Edwards kNN test statistic, T_k. Tango's correction is a chi-square approximation, and its degrees of freedom is estimated using the skewness estimate (see page 121 of Tango (2007)).

The argument, n_1, is the number of cases (denoted as n1 as an argument) and k is the number of NNs considered in T_k test statistic. The argument of the function is the A_{ij} matrix, a, which is the output of the function aij.mat. However, inside the function we symmetrize the matrix a as b <- (a+a^t)/2, to facilitate the formulation.

The number of cases are denoted as n_1 and number of controls as n_0 in this function to match the case-control class labeling, which is just the reverse of the labeling in Cuzick and Edwards (1990).

Usage

SkewTk(n1, k, a)

Arguments

n1

Number of cases

k

Integer specifying the number of NNs (of subject i)

a

A_{ij} matrix which is the output of the function aij.mat.

Value

The skewness of Cuzick and Edwards T_k test statistic for disease clustering

Author(s)

Elvan Ceyhan

References

Cuzick J, Edwards R (1990). “Spatial clustering for inhomogeneous populations (with discussion).” Journal of the Royal Statistical Society, Series B, 52, 73-104.

Tango T (2007). “A class of multiplicity adjusted tests for spatial clustering based on case-control point data.” Biometrics, 63, 119-127.

See Also

ceTk, EV.Tk, and varTk

Examples

n<-20  #or try sample(1:20,1)
Y<-matrix(runif(3*n),ncol=3)
cls<-sample(0:1,n,replace = TRUE)
n1<-sum(cls==1)

k<-sample(1:5,1) # try also 3, 5, sample(1:5,1)
k
a<-aij.mat(Y,k)

SkewTk(n1,k,a)


[Package nnspat version 0.1.2 Index]