Closed cassioalencarnunes closed 1 year ago
I think there is no mistake in the code. If all species pairs are equally distinct, then D_q should equal to ordinary Hill number. But in real world, this won't happen, and D_q can be different from the ordinary Hill number.
Thanks for your answer!
However, neither in my data or in the example data the species pairs are equally distinct. In fact, they are functionally close. Therefore, D_q value should not be close to ordinary Hill number, i.e., there are less equally abundant, functionally equally distinct number of species than the actual number of species.
In addition, even if the distance between all pairs were 1 (the maximum value when distance is standardised), D_q should equal ordinary Hill number following the framework proposed by Chao et al 2014 (Unifying Species Diversity, Phylogenetic Diversity, Functional Diversity, and Related Similarity and Differentiation Measures Through Hill Numbers), right?
I think I noticed what is the problem here. When q = 0
, the current code still calculates the quadratic entropy Q using the $p_ip_j$ in the community data frame. This is now fixed so that when all species are equally abundant, then D_q = S
no matter what $d_{ij}$ are (see page 5 case c of the origin paper).
commit a3ea071132595387e300b261cff18348f052b703
Alright, thank you again for your response.
I think you found one problem, indeed. However, I do not understand why when all species are equally abundant D_q = S. This would only be true if all species were equally functionally distinct, doesn't it? In Table 1 of the theoretical paper it is clear that dij should be considered even when q = 0, otherwise, for q = 0 functional diversity would be the same as taxonomic diversity and it would not make sense.
In addition, the problem of higher D_q than taxonomic diversity is still present when I set q > 0 in hill_funct(), which should also not happen for the same reason as for q = 0: due to functional redundancy, functional Hill number should not be greater than taxonomic Hill numbers.
Please read the Chiu and Chao 2014 Plos One paper for the equations. That's just how the functional hill numbers developed; I simply just translated their equations here. And based on equation 3, the D_q can be larger than S.
I noticed that hill_func() is returning values of D_q (functional hill number, the effective number of equally abundant and functionally equally distinct species) higher than the values of taxonomic species richness, which should not be possible (it is not possible to have more equally abundant and functionally equally distinct species than the number of species). I was afraid it was something wrong with my data, but I checked the example codes with "dummy" dataset from FD package and it happens too.
And the outputs are:
Every community here has D_q higher than species richness for q = 0. Something seems wrong here, but I could not find the problem in the codes. Can you help with this?