diversity_estimate_functional.Rd
This function estimates functional diversity using various methods and
allows for randomization to obtain null distributions. This function is
a wrapper for the melodic
adapted from
https://doi.org/10.1007/s00442-016-3546-0.
diversity_estimate_functional(
data_source_community,
data_source_traits,
sel_method = c("rao", "mpd", "simpson"),
abundance_weighted = TRUE,
rand = 1000
)
Data matrix. Rows as levels and columns as taxa.
Row names should be the sample_id
.
Data frame. Row names be the same taxa as
in data_source_community
and vice versa.
Selected method for diversity estimation:
"rao"
- Rao's quadratic diversity
"mpd"
= Mean Pairwise Distance
"simpson"
= Simpsons Diversity Index
Logical. A value indicating whether or not the calculation should be abundance-weighted (TRUE) or presence/absence-based (FALSE).
Numeric. An integer specifying the number of randomizations to perform to obtain null distributions
Data frame with diversity metric estimated for each level (sample).
Possible outputs depending on the sel_method
:
fd_rao
- Rao's quadratic diversity
fd_mpd
- Mean Pairwise Distance
fd_simpson
- Simpsons Diversity Index
z_score
- Standarise Effect Size (SES), calculated as
(observed value - mean randomised value ) / sd of randomised value