Calculate the effective number of functions for rows in a dataset
eff_num_func(dat, vars, q = 1, standardized = FALSE, D = NULL, tau = NULL)
A data frame with functions in columns and rows as replicates as well as other information.
Column names of function variables
Order of the diversity measure. Defaults to the Shannon case where q = 1. For Simpson, q=2.
Use standardized number of functions (scaled by total
number of functions, so between 0-1), or just raw effective number of
functions for calculation. Defaults to FALSE
.
A distance matrix describing dissimilarity between functions. Defaults
to NULL, and the index is calculated assuming all functions are different. If
it is not null, it must be a symmetric matrix with dimensions matching the
number of functions listed in vars
.
A cutoff for degree of dissimilarity under which functions are considered to be different. If tau is the minimum non-zero value of D, all functions are different. if tau is the maximum value of D are greater, all functions are considered the same.
Returns a vector of effective or standardized effective number of functions
Takes a data frame, variable names, whether we want an index standardized by number of functions or not, an order of Hill number for our effective number of functions as well as a dissimilarity matrix (if desired) and value for a dissimilarity cutoff (defaults to the average dissimilarity). It then calculates and returns the effective number of functions using the appropriate method. See Chao et al. 2019 for more.
Chao, A., Chiu, C.-H., Villéger, S., Sun, I.-F., Thorn, S., Lin, Y.-C., Chiang, J.-M. and Sherwin, W. B. 2019. An attribute-diversity approach to functional diversity, functional beta diversity, and related (dis)similarity measures. Ecological Monographs. 89: e01343.
Jost, L. 2006. Entropy and diversity. Oikos 113(2): 363-375.
Hill, M. 1973. Diversity and evenness: A unifying notation and its consequences. Ecology 54: 427-432.