Calculates Kendall’s rank correlation coefficient τ (R.W. Payne & D.B. Baird).

### Options

`PRINT` = string tokens |
Output required (`correlations` , `probabilities` ); default `corr` , `prob` |
---|---|

`GROUPS` = factor |
Defines the sample membership if only one variate is specified by `DATA` |

`CORRELATIONS` = scalar or symmetric matrix |
Scalar to save the rank correlation coefficient if there are two samples, or symmetric matrix to save the coefficients between all pairs of samples if there are several |

`PROBABILITIES` = scalar or symmetric matrix |
Scalar to save the probability for the correlation coefficient if there are two samples, or symmetric matrix to save the probabilities for all pairs of samples if there are several |

`NORMAL` = scalar or symmetric matrix |
Scalar to save a transformation of tau that approximately follows a Normal distribution with mean zero and variance if there are two samples, or symmetric matrix to save the transformation for all pairs of samples if there are several |

### Parameter

`DATA` = variates |
List of variates containing the data for each sample, or a single variate containing the data from all the samples (the `GROUPS` option must then be set to indicate the sample to which each unit belongs) |
---|

### Description

`KTAU`

calculates Kendall’s rank correlation coefficient (known as τ i.e. tau) between pairs of samples. The samples can be stored in different variates and supplied in a list with the `DATA`

parameter. Alternatively, they can all be placed in a single variate, and the `GROUPS`

option set to a factor to indicate the sample to which each unit belongs.

The `PRINT`

option controls the printed output, with settings:

`correlations` |
to print the correlations between the samples; and |
---|---|

`probabilities` |
to print the corresponding probabilities (calculated under the assumption, or null hypothesis, that there is no association between the samples). |

By default these are both printed.

The `CORRELATIONS`

option allows the correlations to be saved, in a scalar if there are only two samples or in a symmetric matrix if there are three or more. Similarly, the probabilities can be saved using the `PROBABILITIES`

option. Also, you can use the `NORMAL`

option to save a transformation of τ that approximately follows a Normal distribution with mean zero and variance; this provides reasonably accurate probabilities when the number of units *N* is no smaller than 8 (see Kendall 1948).

Options: `PRINT`

, `GROUPS`

, `CORRELATIONS`

, `PROBABILITIES`

, `NORMAL`

.

Parameter: `DATA`

.

### Method

Kendall’s rank correlation coefficient τ is a measure of association between the rankings of two variables measured on *N* individuals. It is calculated as

τ = *S* / √(*NC*_{1} × *NC*_{2})

*S* is defined as the sum of

`SIGN`

(*x _{i}* –

*x*) ×

_{j}`SIGN`

(*y*–

_{i}*y*)

_{j}over all pair of distinct units *i* and *j*. *NC*_{1} and *NC*_{2} are the number of valid comparisons (removing ties and missing values) that can be made amongst the first and second set of samples, respectively. (See Siegel 1956, pages 213-223.)

The transformation of τ into a Normal random variable is given by

τ / √( (2 × (2 × *N* + 5)) / (9 × *N* × (*N* – 1)) )

The probabilities are calculated using procedure `PRKTAU`

.

### Action with `RESTRICT`

If any of the variates in `DATA`

is restricted, the statistic is calculated only for the set of units not excluded by the restriction.

### References

Kendall, M.G. (1948). *Rank Correlation Methods*. Griffin, London.

Siegel, S. (1956). *Nonparametric Statistics for the Behavioural Sciences*. McGraw-Hill, New York.

### See also

Procedures: `PRKTAU`

, `CMHTEST`

, `FCORRELATION`

, `KCONCORDANCE`

, `LCONCORDANCE`

, `SPEARMAN`

.

Commands for Basic and nonparametric statistics.

### Example

CAPTION 'KTAU example',!t(\ 'Data from Siegel, (1956, Nonparametric Statistics, pages 205 & 208).',\ '2 variables are measured on N individuals.'); STYLE=meta,plain VARIATE [VALUE= 82, 98, 87, 40,116,113,111, 83, 85,126,106,117] Authority & [VALUE= 42, 46, 39, 37, 65, 88, 86, 56, 62, 92, 54, 81] Status & [VALUE= 0, 0, 1, 1, 3, 4, 5, 6, 7, 8, 8, 12] Yielding PRINT Authority,Status,Yielding; DECIMALS=0 KTAU [CORRELATIONS=Correlation; PROBABILITIES=Probability]\ Authority,Status PRINT Correlation,Probability KTAU [CORRELATIONS=Correlation; PROBABILITIES=Probability]\ Status,Yielding PRINT Correlation,Probability