skbio.math.diversity.alpha.kempton_taylor_q

skbio.math.diversity.alpha.kempton_taylor_q(counts, lower_quantile=0.25, upper_quantile=0.75)[source]

Calculate Kempton-Taylor Q index of alpha diversity.

Estimates the slope of the cumulative abundance curve in the interquantile range. By default, uses lower and upper quartiles, rounding inwards.

Parameters:

counts : 1-D array_like, int

Vector of counts.

lower_quantile : float, optional

Lower bound of the interquantile range. Defaults to lower quartile.

upper_quantile : float, optional

Upper bound of the interquantile range. Defaults to upper quartile.

Returns:

double

Kempton-Taylor Q index of alpha diversity.

Notes

The index is defined in [R48]. The implementation here is based on the description given in the SDR-IV online manual [R49].

The implementation provided here differs slightly from the results given in Magurran 1998. Specifically, we have 14 in the numerator rather than 15. Magurran recommends counting half of the OTUs with the same # counts as the point where the UQ falls and the point where the LQ falls, but the justification for this is unclear (e.g. if there were a very large # OTUs that just overlapped one of the quantiles, the results would be considerably off). Leaving the calculation as-is for now, but consider changing.

References

[R48](1, 2) Kempton, R. A. and Taylor, L. R. (1976) Models and statistics for species diversity. Nature, 262, 818-820.
[R49](1, 2) http://www.pisces-conservation.com/sdrhelp/index.html