diversity_estimate_phylogenetic.Rd
Function for estimating one of three metrics of phylogenetic diversity. It is a wrapper for various functions from picante package.
diversity_estimate_phylogenetic(
data_matrix,
phylogenetic_tree,
sel_method = c("diversity", "nri", "nti"),
abundance_weighted = TRUE,
rand = 999,
iterations = 1000
)
Data matrix. Rows as levels and columns as data.
Row names should be the sample_id
.
Phylogenetic backbone phylogenetic_tree constructed using ape
package
Selected method for diversity estimation.
"diversity"
- Faith's phylogenetic diversity
"nri"
= Net Relatedness Index
"nti"
= Nearest Taxon Index
Logical. If FALSE, presence-absence data will be used.
Numeric. Number of randomization
Number of iterations to use for each randomization (for independent swap and trial null models)
Data frame with diversity metric estimated for each level (sample).
Possible outputs depending on the sel_method
:
n_taxa
- Taxonomic richness
pd_faith
- Faith's phylogenetic diversity
pd_mpd
- Mean Pairwise Distance
pd_nri
- Net Relatedness Index
pd_mntd
- Mean Nearest Taxon Distance
pd_nti
- Nearest Taxon Index
z_score
- Standarise Effect Size (SES), calculated as
(observed value - mean randomised value ) / sd of randomised value