View source: R/div_similarity.R
div_similarity | R Documentation |
Estimate the diversity of species from abundance or probability data and a similarity matrix between species. Several estimators are available to deal with incomplete sampling. Bias correction requires the number of individuals.
div_similarity(x, similarities, q = 1, ...)
## S3 method for class 'numeric'
div_similarity(
x,
similarities = diag(length(x)),
q = 1,
estimator = c("UnveilJ", "Max", "ChaoShen", "MarconZhang", "UnveilC", "UnveiliC",
"naive"),
probability_estimator = c("Chao2015", "Chao2013", "ChaoShen", "naive"),
unveiling = c("geometric", "uniform", "none"),
jack_alpha = 0.05,
jack_max = 10,
coverage_estimator = c("ZhangHuang", "Chao", "Turing", "Good"),
sample_coverage = NULL,
as_numeric = FALSE,
...,
check_arguments = TRUE
)
## S3 method for class 'species_distribution'
div_similarity(
x,
similarities = diag(sum(!colnames(x) %in% non_species_columns)),
q = 1,
estimator = c("UnveilJ", "Max", "ChaoShen", "MarconZhang", "UnveilC", "UnveiliC",
"naive"),
probability_estimator = c("Chao2015", "Chao2013", "ChaoShen", "naive"),
unveiling = c("geometric", "uniform", "none"),
jack_alpha = 0.05,
jack_max = 10,
coverage_estimator = c("ZhangHuang", "Chao", "Turing", "Good"),
gamma = FALSE,
as_numeric = FALSE,
...,
check_arguments = TRUE
)
x |
An object, that may be a numeric vector containing abundances or probabilities,
or an object of class abundances or probabilities.
If it is a numeric vector, then its length must equal the dimensions of the
|
similarities |
a similarity matrix, that can be obtained by fun_similarity. Its default value is the identity matrix. |
q |
a number: the order of diversity. |
... |
Unused. |
estimator |
An estimator of asymptotic diversity. |
probability_estimator |
a string containing one of the possible estimators of the probability distribution (see probabilities). Used only for extrapolation. |
unveiling |
a string containing one of the possible unveiling methods to estimate the probabilities of the unobserved species (see probabilities). Used only for extrapolation. |
jack_alpha |
the risk level, 5% by default, used to optimize the jackknife order. |
jack_max |
the highest jackknife order allowed. Default is 10. |
coverage_estimator |
an estimator of sample coverage used by coverage. |
sample_coverage |
the sample coverage of |
as_numeric |
if |
check_arguments |
if |
gamma |
if |
All species of the species_distribution
must be found in the matrix of
similarities
if it is named.
If it is not, its size must equal the number of species.
Then, the order of species is assumed to be the same as that of the
species_distribution
.
Similarity-Based diversity can't be interpolated of extrapolated as of the state of the art.
A tibble with the site names, the estimators used and the estimated diversity.
# Similarity matrix
Z <- fun_similarity(paracou_6_fundist)
# Diversity of each community
div_similarity(paracou_6_abd, similarities = Z, q = 2)
# gamma diversity
div_similarity(paracou_6_abd, similarities = Z, q = 2, gamma = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.