The routine may be called by the names g08daf or nagf_nonpar_concordance_kendall.
3Description
Kendall's coefficient of concordance measures the degree of agreement between comparisons of objects, the scores in the th comparison being denoted by
The hypothesis under test, , often called the null hypothesis, is that there is no agreement between the comparisons, and this is to be tested against the alternative hypothesis, , that there is some agreement.
The scores for each comparison are ranked, the rank denoting the rank of object in comparison , and all ranks lying between and . Average ranks are assigned to tied scores.
For each of the objects, the ranks are totalled, giving rank sums , for . Under , all the would be approximately equal to the average rank sum . The total squared deviation of the from this average value is, therefore, a measure of the departure from exhibited by the data. If there were complete agreement between the comparisons, the rank sums would have the values (or some permutation thereof). The total squared deviation of these values is .
Kendall's coefficient of concordance is the ratio
and lies between and , the value indicating complete disagreement, and indicating complete agreement.
If there are tied rankings within comparisons, is corrected by subtracting from the denominator, where , each being the number of occurrences of each tied rank within a comparison, and the summation of being over all comparisons containing ties.
g08daf returns the value of , and also an approximation, , of the significance of the observed . (For approximately follows a distribution, so large values of imply rejection of .) is rejected by a test of chosen size if . If , tables should be used to establish the significance of (e.g., Table R of Siegel (1956)).
4References
Siegel S (1956) Non-parametric Statistics for the Behavioral Sciences McGraw–Hill
5Arguments
1: – Real (Kind=nag_wp) arrayInput
On entry: must be set to the value of object in comparison , for and .
2: – IntegerInput
On entry: the first dimension of the arrays x and rnk as declared in the (sub)program from which g08daf is called.
Constraint:
.
3: – IntegerInput
On entry: , the number of comparisons.
Constraint:
.
4: – IntegerInput
On entry: , the number of objects.
Constraint:
.
5: – Real (Kind=nag_wp) arrayWorkspace
6: – Real (Kind=nag_wp)Output
On exit: the value of Kendall's coefficient of concordance, .
7: – Real (Kind=nag_wp)Output
On exit: the approximate significance, , of .
8: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
Constraint: .
On entry, and .
Constraint: .
On entry, .
Constraint: .
An unexpected error has been triggered by this routine. Please
contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
7Accuracy
All computations are believed to be stable. The statistic should be accurate enough for all practical uses.
8Parallelism and Performance
g08daf is not threaded in any implementation.
9Further Comments
The time taken by g08daf is approximately proportional to the product .
10Example
This example is taken from page 234 of Siegel (1956). The data consists of objects ranked on three different variables: X, Y and Z. The computed values of Kendall's coefficient is significant at the level of significance , indicating that the null hypothesis of there being no agreement between the three rankings X, Y, Z may be rejected with reasonably high confidence.