skembel / picante

R tools for integrating phylogenies and ecology
33 stars 17 forks source link

correct abundance weighted mpd #5

Closed leorjorge closed 7 years ago

leorjorge commented 8 years ago

changed the diagonal in the weighting matrix, to take into account that distances of a given individual with itself cannot be taken into account

skembel commented 7 years ago

Thanks for the pull request and sorry this was unresolved for so long. The problem is that not all community data represent individuals - for example abundances could represent biomass or density or percent cover, in which case it could be valid to compare a category with itself. Also certain approaches for partitioning alpha/beta diversity require the inclusion or exclusion of within-category distances. I'll incorporate your suggested changes in an upcoming update that will allow users to specify whether they want intra-category distances to be included when calculating MPD.