Goodman and Kruskal's gamma of a table of two ordered classifications, with its asymptotic standard error and a
Wald confidence interval. Equivalent to DescTools::GoodmanKruskalGamma() in R.
gamma = (C - D) / (C + D) with C and D the numbers of concordant and discordant pairs. The standard error is the
non-null ASE1 (Agresti 2010, section 7.1): sqrt(sum x psi^2) with psi_ij = 2 (D Pc_ij - C Pd_ij) / (C + D)^2,
Pc_ij the counts above-left and below-right of cell (i, j) and Pd_ij those above-right and below-left. The
interval is [max(-1, gamma - z ase), min(1, gamma + z ase)], z the normal quantile of 1 - (1 - confLevel) / 2.
Without concordant or discordant pairs (a table with one row, for example) gamma and the interval are NaN, as
DescTools. No test of gamma = 0 is given (it would need the null standard error).
Goodman and Kruskal's gamma of a table of two ordered classifications, with its asymptotic standard error and a Wald confidence interval. Equivalent to
DescTools::GoodmanKruskalGamma()in R.gamma = (C - D) / (C + D)with C and D the numbers of concordant and discordant pairs. The standard error is the non-null ASE1 (Agresti 2010, section 7.1):sqrt(sum x psi^2)withpsi_ij = 2 (D Pc_ij - C Pd_ij) / (C + D)^2,Pc_ijthe counts above-left and below-right of cell (i, j) andPd_ijthose above-right and below-left. The interval is[max(-1, gamma - z ase), min(1, gamma + z ase)], z the normal quantile of1 - (1 - confLevel) / 2. Without concordant or discordant pairs (a table with one row, for example) gamma and the interval are NaN, as DescTools. No test of gamma = 0 is given (it would need the null standard error).