tsallis {vegan} | R Documentation |
Function tsallis
find Tsallis diversities with any scale or the corresponding evenness measures. Function tsallisaccum
finds these statistics with accumulating sites.
tsallis(x, scales = seq(0, 2, 0.2), norm = FALSE) tsallisaccum(x, scales = seq(0, 2, 0.2), permutations = 100, raw = FALSE, ...) ## S3 method for class 'tsallisaccum': persp(x, theta = 220, phi = 15, col = heat.colors(100), zlim, ...)
x |
Community data matrix or plotting object. |
scales |
Scales of Tsallis diversity. |
norm |
Logical, if TRUE diversity values are normalized by their maximum (diversity value at equiprobability conditions). |
permutations |
Number of random permutations in accumulating sites. |
raw |
If FALSE then return summary statistics of permutations, and if TRUE then returns the individual permutations. |
theta, phi |
angles defining the viewing direction. theta gives the azimuthal direction and phi the colatitude. |
col |
Colours used for surface. |
zlim |
Limits of vertical axis. |
... |
Other arguments which are passed to tsallis and to graphical functions. |
The Tsallis diversity (also equivalent to Patil and Taillie diversity) is a one-parametric generalised entropy function, defined as:
H.q = 1/(q-1)(1-sum(p^q))
where q is a scale parameter, S the number of species in the sample (Tsallis 1988, Tothmeresz 1995). This diversity is concave for all q>0, but non-additive (Keylock 2005). For q=0 it gives the number of species minus one, as q tends to 1 this gives Shannon diversity, for q=2 this gives the Simpson index (see function diversity
).
When norm = TRUE
, tsallis
gives values normalized by the maximum:
H.q(max) = (S^(1-q)-1)/(1-q)
where S is the number of species. As q tends to 1, maximum is defined as ln(S).
Details on plotting methods and accumulating values can be found on the help pages of the functions renyi
and renyiaccum
.
Function tsallis
returns a data frame of selected indices. Function tsallisaccum
with argument raw = FALSE
returns a three-dimensional array, where the first dimension are the accumulated sites, second dimension are the diveristy scales, and third dimension are the summary statistics mean
, stdev
, min
, max
, Qnt 0.025
and Qnt 0.975
. With argument raw = TRUE
the statistics on the third dimension are replaced with individual permutation results.
P'eter S'olymos, solymos@ualberta.ca, based on the code of Roeland Kindt and Jari Oksanen written for renyi
Tsallis, C. (1988). Possible generalization of Boltzmann-Gibbs statistics. J. Stat. Phis. 52, 479–487.
Tothmeresz, B. (1995). Comparison of different methods for diversity ordering. Journal of Vegetation Science 6, 283–290.
Patil, GP and Taillie, C. (1982). Diversity as a concep and its measurement. J. Am. Stat. Ass. 77, 548–567.
Keylock, CJ (2005). Simpson diversity and the Shannon-Wiener index as special cases of a generalized entropy. Oikos 109, 203–207.
Plotting methods and accumulation routins are based on functions renyi
and renyiaccum
. An object of class 'tsallisaccum' can be used with function rgl.renyiaccum
as well. See also settings for persp
.
data(BCI) i <- sample(nrow(BCI), 12) x1 <- tsallis(BCI[i,]) x1 diversity(BCI[i,],"simpson") == x1[["2"]] plot(x1) x2 <- tsallis(BCI[i,],norm=TRUE) x2 plot(x2) mod1 <- tsallisaccum(BCI[i,]) plot(mod1, as.table=TRUE, col = c(1, 2, 2)) persp(mod1) mod2 <- tsallisaccum(BCI[i,], norm=TRUE) persp(mod2,theta=100,phi=30)