site_species_metrics: Calculate contribution metrics of sites and species

View source: R/site_species_metrics.R

site_species_metricsR Documentation

Calculate contribution metrics of sites and species

Description

This function calculates metrics to assess the contribution of a given species or site to its bioregion.

Usage

site_species_metrics(
  bioregionalization,
  comat,
  indices = c("rho"),
  net = NULL,
  site_col = 1,
  species_col = 2
)

Arguments

bioregionalization

A bioregion.clusters object.

comat

A co-occurrence matrix with sites as rows and species as columns.

indices

A character specifying the contribution metric to compute. Available options are rho, affinity, fidelity, indicator_value and Cz.

net

NULL by default. Required for Cz indices. A data.frame where each row represents an interaction between two nodes and an optional third column indicating the interaction's weight.

site_col

A number indicating the position of the column containing the sites in net. 1 by default.

species_col

A number indicating the position of the column containing the species in net. 2 by default.

Details

The \rho metric is derived from Lenormand et al. (2019) with the following formula:

\rho_{ij} = \frac{n_{ij} - \frac{n_i n_j}{n}}{\sqrt{\left(\frac{n - n_j}{ n-1}\right) \left(1-\frac{n_j}{n}\right) \frac{n_i n_j}{n}}}

where n is the number of sites, n_i is the number of sites in which species i is present, n_j is the number of sites in bioregion j, and n_{ij} is the number of occurrences of species i in sites of bioregion j.

Affinity A, fidelity F, and individual contributions IndVal describe how species are linked to their bioregions. These metrics are described in Bernardo-Madrid et al. (2019):

  • Affinity of species to their region: A_i = \frac{R_i}{Z}, where R_i is the occurrence/range size of species i in its associated bioregion, and Z is the total size (number of sites) of the bioregion. High affinity indicates that the species occupies most sites in its bioregion.

  • Fidelity of species to their region: F_i = \frac{R_i}{D_i}, where R_i is the occurrence/range size of species i in its bioregion, and D_i is its total range size. High fidelity indicates that the species is not present in other regions.

  • Indicator Value of species: IndVal = F_i \cdot A_i.

Cz metrics are derived from Guimerà & Amaral (2005):

  • Participation coefficient: C_i = 1 - \sum_{s=1}^{N_M}{\left(\frac{k_{is}}{k_i}\right)^2}, where k_{is} is the number of links of node i to nodes in bioregion s, and k_i is the total degree of node i. A high value means links are uniformly distributed; a low value means links are within the node's bioregion.

  • Within-bioregion degree z-score: z_i = \frac{k_i - \overline{k_{si}}}{\sigma_{k_{si}}}, where k_i is the number of links of node i to nodes in its bioregion s_i, \overline{k_{si}} is the average degree of nodes in s_i, and \sigma_{k_{si}} is the standard deviation of degrees in s_i.

Value

A data.frame with columns Bioregion, Species, and the desired summary statistics, or a list of data.frames if Cz and other indices are selected.

Author(s)

Pierre Denelle (pierre.denelle@gmail.com)
Boris Leroy (leroy.boris@gmail.com)
Maxime Lenormand (maxime.lenormand@inrae.fr)

References

Bernardo-Madrid R, Calatayud J, González‐Suárez M, Rosvall M, Lucas P, Antonelli A & Revilla E (2019) Human activity is altering the world’s zoogeographical regions. Ecology Letters 22, 1297–1305.

Guimerà R & Amaral LAN (2005) Functional cartography of complex metabolic networks. Nature 433, 895–900.

Lenormand M, Papuga G, Argagnon O, Soubeyrand M, Alleaume S & Luque S (2019) Biogeographical network analysis of plant species distribution in the Mediterranean region. Ecology and Evolution 9, 237–250.

See Also

For more details illustrated with a practical example, see the vignette: https://biorgeo.github.io/bioregion/articles/a5_3_summary_metrics.html.

Associated functions: bioregion_metrics bioregionalization_metrics

Examples

comat <- matrix(sample(0:1000, size = 500, replace = TRUE, prob = 1/1:1001),
                20, 25)
rownames(comat) <- paste0("Site",1:20)
colnames(comat) <- paste0("Species",1:25)

dissim <- dissimilarity(comat, metric = "Simpson")
clust1 <- nhclu_kmeans(dissim, n_clust = 3, index = "Simpson")

net <- similarity(comat, metric = "Simpson")
com <- netclu_greedy(net)

site_species_metrics(bioregionalization = clust1, comat = comat,
indices = "rho")

# Contribution metrics
site_species_metrics(bioregionalization = com, comat = comat,
indices = c("rho", "affinity", "fidelity", "indicator_value"))

# Cz indices
net_bip <- mat_to_net(comat, weight = TRUE)
clust_bip <- netclu_greedy(net_bip, bipartite = TRUE)
site_species_metrics(bioregionalization = clust_bip, comat = comat, 
net = net_bip, indices = "Cz")


bioregion documentation built on April 12, 2025, 9:13 a.m.