qrank: Calculation of quantiles of rank correlations
Description
For a given value of the test statistic, this routine computes approximated or exact conservative and liberal critical values under the hypothesis of no association.
Usage
qrank(prob, n, index="spearman", approx="vggfr", print = FALSE, lower.tail = TRUE)
Arguments
prob
the nominal level of significance.
n
the number of ranks.
index
a character string that specifies the rank correlation used in the test. Acceptable values are:
"spearman","kendall","gini","r4". Only enough of the string to be unique is required.
approx
a character string that specifies the type of approximation to the null distribution: "vggfr", "exact","gaussian","student".
print
FALSE suppresses partial output.
lower.tail
logical; if TRUE (default), probability $P [X\leq x]$ is computed, otherwise $P[X>x]$.
Value
a list containing the following components:
nnumber of ranks.
Statisticcoefficient of rank order association
Levelnominal level
Cqconservative quantile
Cvconservative p-value
Lqliberal quantile
Lvliberal p-value
Details
This routine provides two exact quantiles corresponding to a conservative level (next smaller exact size) and a liberal level (next larger exact size). However, in the case of $n>26$ (Spearman) or $n>60$ (Kendall) or $n>24$ (Gini) or $n>15$ (r4), approximated quantiles are provided according to approx. The default option is "vggfr".
Exact computations use frequencies obtained by complete enumeration for Spearman's rho, Gini's gamma, and r4. A recursive formula is employed in the case of Kendall's tau.