Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/log_modulo_skewness.R
Calculates the community rarity index by log-modulo skewness.
1 | log_modulo_skewness(x, q = 0.5, n = 50)
|
x |
Abundance matrix (taxa x samples) with counts |
q |
Arithmetic abundance classes are evenly cut up to to this quantile of the data. The assumption is that abundances higher than this are not common, and they are classified in their own group. |
n |
The number of arithmetic abundance classes from zero to the quantile cutoff indicated by q. |
The rarity index characterizes the concentration of species at low abundance. Here, we use the skewness of the frequency distribution of arithmetic abundance classes (see Magurran & McGill 2011). These are typically right-skewed; to avoid taking log of occasional negative skews, we follow Locey & Lennon (2016) and use the log-modulo transformation that adds a value of one to each measure of skewness to allow logarithmization.
A vector of rarity indices
Contact: Leo Lahti microbiome-admin@googlegroups.com
Kenneth J. Locey and Jay T. Lennon. Scaling laws predict global microbial diversity. PNAS 2016 113 (21) 5970-5975; doi:10.1073/pnas.1521291113.
Magurran AE, McGill BJ, eds (2011) Biological Diversity: Frontiers in Measurement and Assessment (Oxford Univ Press, Oxford), Vol 12
core_abundance, low_abundance, alpha
1 2 | data(dietswap)
d <- log_modulo_skewness(dietswap)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.