# Kendall

From SuppDists v1.0-0
by Bob Wheeler

##### The distribution of Kendall's tau

Density, distribution function, quantile function, random generator and summary function for Kendall's tau.

- Keywords
- distribution

##### Usage

```
dKendall(x, N, log=FALSE)
pKendall(q, N, lower.tail=TRUE, log.p=FALSE)
qKendall(p, N, lower.tail=TRUE, log.p=FALSE)
rKendall(n, N)
sKendall(N)
```

##### Arguments

- x,q
- vector of non-negative quantities
- p
- vector of probabilities
- n
- number of values to generate. If n is a vector, length(n) values will be generated
- N
- vector number of treatments
- log, log.p
- logical vector; if TRUE, probabilities p are given as log(p)
- lower.tail
- logical vector; if TRUE (default), probabilities are $P[X <= x]$,="" otherwise,="" $p[x=""> x]$

##### Details

There are two categories with N treatments each. The treatments are ranked for each category, and then sorted according to the ranks for the first category. This produces a 2 by N array in which the numbers in the first row are increasing from 1 to N. The array is scanned, and every time two adjacent ranks in the second row are not in order, they are exchanged. The scanning is repeated until the second row is in increasing order. Let s denote the number of exchanges, then Kendall's tau is given by

$$\tau=1-\frac{4s}{N(N-1)}$$

##### Value

- The output values conform to the output from other such functions in R.
`dKendall()`

gives the density,`pKendall()`

the distribution function and`qKendall()`

its inverse.`rKendall()`

generates random numbers.`sKendall()`

produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis.

##### eqn

$N < 13$

##### References

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

##### Examples

```
pKendall(0, N=10)
pKendall(c(-.42,0.02,.42), N=10) ## approximately 5\% 50\% and 95\%
qKendall(.95,N=c(10,20))
sKendall(N=10)
plot(function(x)dKendall(x, N=10),-0.5,0.5)
```

*Documentation reproduced from package SuppDists, version 1.0-0, License: GPL vesion 2 or newer*

### Community examples

Looks like there are no examples yet.