PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_nonpar_concordance_kendall (g08da)
Purpose
nag_nonpar_concordance_kendall (g08da) calculates Kendall's coefficient of concordance on independent rankings of objects or individuals.
Syntax
[
w,
p,
ifail] = nag_nonpar_concordance_kendall(
x,
k, 'n',
n)
Description
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.
nag_nonpar_concordance_kendall (g08da) 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)).
References
Siegel S (1956) Non-parametric Statistics for the Behavioral Sciences McGraw–Hill
Parameters
Compulsory Input Parameters
- 1:
– double array
-
ldx, the first dimension of the array, must satisfy the constraint
.
must be set to the value of object in comparison , for and .
- 2:
– int64int32nag_int scalar
-
, the number of comparisons.
Constraint:
.
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the second dimension of the array
x.
, the number of objects.
Constraint:
.
Output Parameters
- 1:
– double scalar
-
The value of Kendall's coefficient of concordance, .
- 2:
– double scalar
-
The approximate significance, , of .
- 3:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Errors or warnings detected by the function:
-
-
-
-
-
-
-
An unexpected error has been triggered by this routine. Please
contact
NAG.
-
Your licence key may have expired or may not have been installed correctly.
-
Dynamic memory allocation failed.
Accuracy
All computations are believed to be stable. The statistic should be accurate enough for all practical uses.
Further Comments
The time taken by nag_nonpar_concordance_kendall (g08da) is approximately proportional to the product .
Example
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.
Open in the MATLAB editor:
g08da_example
function g08da_example
fprintf('g08da example results\n\n');
x = [1, 4.5, 2, 4.5, 3, 7.5, 6, 9, 7.5, 10;
2.5, 1, 2.5, 4.5, 4.5, 8, 9, 6.5, 10, 6.5;
2, 1, 4.5, 4.5, 4.5, 4.5, 8, 8, 8, 10 ];
fprintf('Kendall''s coefficient of concordance\n\n');
labrow = 'Character';
rlabs = {'Comparison 1 scores';
'Comparison 2 scores';
'Comparison 3 scores'};
labcol = 'None';
clabs = {' '};
ncols = int64(80);
indent = int64(0);
[ifail] = x04cb( ...
'General', ' ', x, 'F5.1', 'Data values', labrow, ...
rlabs, labcol, clabs, ncols, indent);
k = int64(3);
[w, p, ifail] = g08da(x, k);
fprintf('\nKendall''s coefficient = %8.3f\n', w);
fprintf(' Significance = %8.3f\n', p);
g08da example results
Kendall's coefficient of concordance
Data values
Comparison 1 scores 1.0 4.5 2.0 4.5 3.0 7.5 6.0 9.0 7.5 10.0
Comparison 2 scores 2.5 1.0 2.5 4.5 4.5 8.0 9.0 6.5 10.0 6.5
Comparison 3 scores 2.0 1.0 4.5 4.5 4.5 4.5 8.0 8.0 8.0 10.0
Kendall's coefficient = 0.828
Significance = 0.008
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015