Skip to contents

In this vignette, we aim at evaluating the contribution of individual species to each bioregion, using the function contribution().

Data

We use the vegetation dataset that comes with bioregion.

data("vegedf")
data("vegemat")

# Calculation of (dis)similarity matrices
vegedissim <- dissimilarity(vegemat, metric = c("Simpson"))
vegesim <- dissimilarity_to_similarity(vegedissim)

Bioregionalization

We use the same three bioregionalization algorithms as in the visualization vignette, i.e. a non-hierarchical, hierarchical and network bioregionalizations.
We chose 3 bioregions for the non-hierarchical and hierarchical bioregionalizations.

# Non hierarchical bioregionalization
vege_nhclu_kmeans <- nhclu_kmeans(vegedissim, n_clust = 3, index = "Simpson")
vege_nhclu_kmeans$cluster_info # 3
##     partition_name n_clust
## K_3            K_3       3
# Hierarchical bioregionalization
set.seed(1)
vege_hclu_hierarclust <- hclu_hierarclust(dissimilarity = vegedissim,
                                          index = names(vegedissim)[3],
                                          method = "mcquitty", n_clust = 3)
vege_hclu_hierarclust$cluster_info # 3
##   partition_name n_clust requested_n_clust output_cut_height
## 1            K_3       3                 3             0.625
# Network bioregionalization
set.seed(1)
vege_netclu_walktrap <- netclu_walktrap(vegesim,
                                        index = names(vegesim)[3])
vege_netclu_walktrap$cluster_info # 3
##     partition_name n_clust
## K_3            K_3       3

Indices


The contribution index ρ\rho is calculated for each species x bioregion combination, following (Lenormand et al., 2019).
Its formula is the following:

ρij=nijninjnnnjn1(1njn)ninjn\rho_{ij} = \frac{n_{ij} - \frac{n_i n_j}{n}}{\sqrt{\frac{n - n_j}{n-1} (1-\frac{n_j}{n}) \frac{n_i n_j}{n}}} with nn the number of sites, nin_i the number of sites in which species ii is present, njn_j the number of sites belonging to the bioregion jj, nijn_ij the number of occurrences of species ii in sites belonging to the bioregion jj.

Contribution

We can now run the function contribution().

contrib_kmeans <- contribution(vege_nhclu_kmeans, vegemat,
                               indices = "contribution")
contrib_hclu <- contribution(vege_hclu_hierarclust, vegemat,
                             indices = "contribution")
contrib_netclu <- contribution(vege_netclu_walktrap, vegemat,
                               indices = "contribution")

contribution() produces a single data.frame output.

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.