tsallis: Tsallis Diversity and Corresponding Accumulation Curves

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/tsallis.R

Description

Function tsallis find Tsallis diversities with any scale or the corresponding evenness measures. Function tsallisaccum finds these statistics with accumulating sites.

Usage

1
2
3
4
5
tsallis(x, scales = seq(0, 2, 0.2), norm = FALSE, hill = FALSE)
tsallisaccum(x, scales = seq(0, 2, 0.2), permutations = 100, 
   raw = FALSE, subset, ...)
## S3 method for class 'tsallisaccum'
persp(x, theta = 220, phi = 15, col = heat.colors(100), zlim, ...)

Arguments

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).

hill

Calculate Hill numbers.

permutations

Usually an integer giving the number permutations, but can also be a list of control values for the permutations as returned by the function how, or a permutation matrix where each row gives the permuted indices.

raw

If FALSE then return summary statistics of permutations, and if TRUE then returns the individual permutations.

subset

logical expression indicating sites (rows) to keep: missing values are taken as FALSE.

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.

Details

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).

If 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).

If hill = TRUE, tsallis gives Hill numbers (numbers equivalents, see Jost 2007):

D.q = (1-(q-1)*H)^(1/(1-q))

Details on plotting methods and accumulating values can be found on the help pages of the functions renyi and renyiaccum.

Value

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 diversity 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.

Author(s)

Péter Sólymos, [email protected], based on the code of Roeland Kindt and Jari Oksanen written for renyi

References

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, G. P. and Taillie, C. (1982) Diversity as a concept and its measurement. J. Am. Stat. Ass. 77, 548–567.

Keylock, C. J. (2005) Simpson diversity and the Shannon-Wiener index as special cases of a generalized entropy. Oikos 109, 203–207.

Jost, L (2007) Partitioning diversity into independent alpha and beta components. Ecology 88, 2427–2439.

See Also

Plotting methods and accumulation routines 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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

Example output

Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
     0      0.2      0.4       0.6      0.8        1      1.2      1.4      1.6
32  87 39.46244 19.31897 10.289732 5.982060 3.784873 2.584344 1.882462 1.445176
20  99 44.47873 21.56561 11.366723 6.530095 4.077327 2.746035 1.974163 1.498140
3   89 39.79074 19.34183 10.294475 6.003596 3.814060 2.612130 1.905004 1.461939
8   87 39.98200 19.77567 10.603913 6.181934 3.908381 2.659907 1.928610 1.473408
10  93 41.50369 20.10059 10.639881 6.164157 3.889803 2.648176 1.922207 1.470121
50  92 41.30206 20.08829 10.663128 6.187254 3.906616 2.659292 1.929248 1.474476
23  98 44.40473 21.59625 11.375711 6.520517 4.062575 2.732882 1.964464 1.491646
46  85 38.71044 19.06049 10.224553 5.987209 3.810489 2.611431 1.904913 1.461976
9   89 39.96271 19.39982 10.272025 5.952153 3.761331 2.568371 1.872010 1.438318
5  100 44.20598 21.17686 11.081257 6.350040 3.969940 2.683412 1.937940 1.477217
12  83 37.71285 18.51298  9.908623 5.800306 3.698414 2.543635 1.863626 1.436691
2   83 38.06254 18.90957 10.230614 6.028061 3.848471 2.638667 1.922477 1.472692
        1.8         2
32 1.156659 0.9565267
20 1.187661 0.9748589
3  1.168492 0.9646078
8  1.173986 0.9671998
10 1.172341 0.9663808
50 1.174993 0.9679784
23 1.183553 0.9723529
46 1.168556 0.9646728
9  1.152087 0.9534257
5  1.175553 0.9678267
12 1.152998 0.9550599
2  1.174887 0.9683393
  32   20    3    8   10   50   23   46    9    5   12    2 
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 
   0       0.2       0.4       0.6       0.8         1       1.2       1.4
32 1 0.9035303 0.8473994 0.8239937 0.8259777 0.8453403 0.8737041 0.9037309
20 1 0.9168340 0.8714005 0.8563191 0.8638340 0.8853802 0.9124664 0.9383899
3  1 0.8943582 0.8362208 0.8155352 0.8226868 0.8476046 0.8803722 0.9129172
8  1 0.9154260 0.8674322 0.8491531 0.8535754 0.8729254 0.8992501 0.9258854
10 1 0.9001004 0.8450759 0.8255446 0.8324355 0.8561634 0.8872568 0.9180261
50 1 0.9036351 0.8503796 0.8315870 0.8385564 0.8618931 0.8922712 0.9221556
23 1 0.9228895 0.8782744 0.8611017 0.8654544 0.8841064 0.9093061 0.9344888
46 1 0.9032439 0.8485357 0.8278693 0.8331492 0.8554539 0.8856795 0.9162035
9  1 0.8982235 0.8387276 0.8137568 0.8156375 0.8358867 0.8656242 0.8971059
5  1 0.9038026 0.8502581 0.8308757 0.8372445 0.8602030 0.8904867 0.9204832
12 1 0.8971858 0.8367628 0.8114291 0.8136186 0.8347024 0.8655269 0.8980648
2  1 0.9055048 0.8546877 0.8377974 0.8455660 0.8685692 0.8978637 0.9264249
         1.6       1.8         2
32 0.9304962 0.9518103 0.9675213
20 0.9594192 0.9746101 0.9847059
3  0.9403687 0.9610574 0.9754460
8  0.9486740 0.9660687 0.9783170
10 0.9438798 0.9632975 0.9767719
50 0.9471031 0.9657020 0.9784999
23 0.9556498 0.9714412 0.9822749
46 0.9422698 0.9621112 0.9760219
9  0.9251745 0.9475646 0.9641383
5  0.9456409 0.9644767 0.9775050
12 0.9269514 0.9498277 0.9665666
2  0.9501791 0.9678597 0.9800060

vegan documentation built on May 31, 2017, 4:08 a.m.