R: Quantiles of exact and approximated null distributions of...
qrank
R Documentation
Quantiles of exact and approximated null distributions of rank correlations
Description
For a given level of significance, this routine computes approximated or exact conservative
and/or 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","fy","filliben". 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 <= x] is computed, otherwise P[X>x]. In brief, lower tailed tests are used to test for negative correlation and upper tailed tests are used to test for positive correlation.
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 (r_4, Fisher-Yates coefficient and Filliben rank correlation), an approximated, but unique quantile is produced according to approx. The default option is "vggfr" in the case of Spearman and r_4; "gaussian" for Kendall, "fy", and "filliben"; "student" for Gini's cograduation.
Exact computations use frequencies obtained by complete enumeration for Spearman's r_1, Gini's r_2, r_4, r_5 (Fisher-Yates coefficient), and r_6 (Filliben rank correlation). A recursive formula is employed in the case of Kendall's r_3.
Value
a list containing the following components:
n
number of ranks.
Statistic
coefficient of rank order association
Level
nominal level
Cq
conservative quantile
Cv
conservative p-value
Lq
liberal quantile
Lv
liberal p-value
Note
The quantile function Q(.) of a symmetrical distribution satisfies:
Q(0.5)-Q(p)=Q(1-p)-Q(0.5)quad for 0<p< 0.5
Author(s)
Agostino Tarsitano, Ilaria Lucrezia Amerise and Marco Marozzi