ShanKothari / DecomposingFD

Code to calculate functional trait diversity as defined by Scheiner et al. (2016), and its decomposition into richness, evenness, and dispersion.
8 stars 5 forks source link

qHT for 1 species communities #3

Closed annakat closed 6 years ago

annakat commented 6 years ago

I believe Ht for 1 species communities should be defined as Ht = 0 (see Scheiner et al. 2016 note below eqn 3: "qHT = 0, if all dij =0").

Doesn't the current code set Ht = 1? if(q==1){ fijlog<-fijlog(fij) fijlog[is.na(fijlog)]<-0 Ht<-exp(-1sum(fijlog)) }

It follows that currently qDT/qET = 1.62, instead of qDT/qET = 1 (for 1 species comm). The result for qDTM is correct.

ShanKothari commented 6 years ago

Thank you! I've just fixed this.