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;textualnnspat).
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:1990;textualnnspat.