Skip to contents

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.

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.

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\).

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

Author

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

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")
#>    Bioregion   Species         rho
#> 1          1  Species1 1515.511843
#> 2          1  Species2  364.794029
#> 3          1  Species3  171.937257
#> 4          1  Species4  714.327872
#> 5          1  Species5  453.213412
#> 6          1  Species6  450.241223
#> 7          1  Species7  660.588567
#> 8          1  Species8  834.441913
#> 9          1  Species9  285.287785
#> 10         1 Species10 1110.387912
#> 11         1 Species11 1791.976471
#> 12         1 Species12 1155.609692
#> 13         1 Species13 1107.664249
#> 14         1 Species14  482.090909
#> 15         1 Species15  840.849114
#> 16         1 Species16  773.914158
#> 17         1 Species17  314.177135
#> 18         1 Species18  614.034174
#> 19         1 Species19  712.064360
#> 20         1 Species20  816.170805
#> 21         1 Species21 1043.316688
#> 22         1 Species22  791.513661
#> 23         1 Species23  673.000000
#> 24         1 Species24 1133.842077
#> 25         1 Species25  739.426209
#> 26         2  Species1  174.724740
#> 27         2  Species2  741.049144
#> 28         2  Species3  652.263823
#> 29         2  Species4   86.970784
#> 30         2  Species5  754.613568
#> 31         2  Species6  100.418459
#> 32         2  Species7  775.715529
#> 33         2  Species8  482.091959
#> 34         2  Species9  427.633703
#> 35         2 Species10  791.389856
#> 36         2 Species11  416.199603
#> 37         2 Species12  393.430261
#> 38         2 Species13    5.153062
#> 39         2 Species14  718.691955
#> 40         2 Species15 1067.828448
#> 41         2 Species16  331.114167
#> 42         2 Species17  113.386253
#> 43         2 Species18  197.239056
#> 44         2 Species19  884.092160
#> 45         2 Species20  575.291145
#> 46         2 Species21   51.729780
#> 47         2 Species22  258.895528
#> 48         2 Species23  493.572183
#> 49         2 Species24  467.249282
#> 50         2 Species25   63.405401
#> 51         3  Species1  974.991715
#> 52         3  Species2  466.957908
#> 53         3  Species3  165.633736
#> 54         3  Species4   59.224257
#> 55         3  Species5  324.490831
#> 56         3  Species6  438.671957
#> 57         3  Species7    7.045180
#> 58         3  Species8  896.250294
#> 59         3  Species9  287.397031
#> 60         3 Species10   -2.431278
#> 61         3 Species11  809.583130
#> 62         3 Species12  100.776712
#> 63         3 Species13 1036.254154
#> 64         3 Species14 1207.029494
#> 65         3 Species15  477.044072
#> 66         3 Species16  563.920750
#> 67         3 Species17  115.202913
#> 68         3 Species18  775.846703
#> 69         3 Species19  182.023754
#> 70         3 Species20  129.307472
#> 71         3 Species21   77.379795
#> 72         3 Species22  695.157385
#> 73         3 Species23  518.916842
#> 74         3 Species24 1371.049071
#> 75         3 Species25   23.259566

# Contribution metrics
site_species_metrics(bioregionalization = com, comat = comat,
indices = c("rho", "affinity", "fidelity", "indicator_value"))
#>    Bioregion   Species           rho  affinity     fidelity       indval
#> 1          1  Species1 20350.0617580 228.10526 240.77777778 5.492268e+04
#> 2          1  Species2 12189.1129075 133.10526 148.76470588 1.980137e+04
#> 3          1  Species3  4151.4822937  45.89474  51.29411765 2.354130e+03
#> 4          1  Species4  6112.8587148  63.05263  79.86666667 5.035804e+03
#> 5          1  Species5 11825.3094699 129.15789 144.35294118 1.864432e+04
#> 6          1  Species6  7299.9735616  72.57895  98.50000000 7.149026e+03
#> 7          1  Species7 11152.9595574 125.42105 132.38888889 1.660435e+04
#> 8          1  Species8 16928.2590207 184.52632 206.23529412 3.805584e+04
#> 9          1  Species9  6582.7806941  67.84211  85.93333333 5.829898e+03
#> 10         1 Species10 13634.0649949 134.94737 183.14285714 2.471465e+04
#> 11         1 Species11 21071.3106748 236.15789 249.27777778 5.886892e+04
#> 12         1 Species12 12279.6163621 138.00000 145.66666667 2.010200e+04
#> 13         1 Species13 16399.6918738 184.00000 194.22222222 3.573689e+04
#> 14         1 Species14 15076.9726142 173.89474 173.89473684 3.023938e+04
#> 15         1 Species15 18441.6813209 200.94737 224.58823529 4.513041e+04
#> 16         1 Species16 11369.8056370 127.84211 134.94444444 1.725158e+04
#> 17         1 Species17  4136.9301562  45.73684  51.11764706 2.337960e+03
#> 18         1 Species18 12174.5607699 132.94737 148.58823529 1.975441e+04
#> 19         1 Species19 10219.7236322 111.73684 124.88235294 1.395396e+04
#> 20         1 Species20 11614.0000000 123.05263 146.12500000 1.798107e+04
#> 21         1 Species21  8905.1805445  97.47368 108.94117647 1.061890e+04
#> 22         1 Species22 12761.4969825 139.31579 155.70588235 2.169229e+04
#> 23         1 Species23 12346.9253812 142.57895 142.57894737 2.032876e+04
#> 24         1 Species24 22814.0000000 240.94737 286.12500000 6.894107e+04
#> 25         1 Species25  6279.2615277  57.84211  91.58333333 5.297373e+03
#> 26         2  Species1     0.1081476   1.00000   0.05555556 5.555556e-02
#> 27         2  Species2    -0.9459053   0.00000   0.00000000 0.000000e+00
#> 28         2  Species3   815.8711445 734.00000  43.17647059 3.169153e+04
#> 29         2  Species4    99.8107859  85.00000   5.66666667 4.816667e+02
#> 30         2  Species5     9.0695626   9.00000   0.52941176 4.764706e+00
#> 31         2  Species6    62.9080962  52.00000   3.71428571 1.931429e+02
#> 32         2  Species7     1.1896238   2.00000   0.11111111 2.222222e-01
#> 33         2  Species8    17.9722008  17.00000   1.00000000 1.700000e+01
#> 34         2  Species9   264.4837739 224.00000  14.93333333 3.345067e+03
#> 35         2 Species10   224.7768819 184.00000  13.14285714 2.418286e+03
#> 36         2 Species11   458.6540313 425.00000  23.61111111 1.003472e+04
#> 37         2 Species12    77.9744298  73.00000   4.05555556 2.960556e+02
#> 38         2 Species13     0.1081476   1.00000   0.05555556 5.555556e-02
#> 39         2 Species14   806.3684211 767.00000  40.36842105 3.096258e+04
#> 40         2 Species15    -0.9459053   0.00000   0.00000000 0.000000e+00
#> 41         2 Species16   328.8768944 305.00000  16.94444444 5.168056e+03
#> 42         2 Species17     4.6182435   5.00000   0.29411765 1.470588e+00
#> 43         2 Species18    -0.9459053   0.00000   0.00000000 0.000000e+00
#> 44         2 Species19   809.1941659 728.00000  42.82352941 3.117553e+04
#> 45         2 Species20    19.7297531  18.00000   1.12500000 2.025000e+01
#> 46         2 Species21    -0.9459053   0.00000   0.00000000 0.000000e+00
#> 47         2 Species22   141.4963050 128.00000   7.52941176 9.637647e+02
#> 48         2 Species23   143.2105263 137.00000   7.21052632 9.878421e+02
#> 49         2 Species24    -0.9176629   0.00000   0.00000000 0.000000e+00
#> 50         2 Species25    -0.7947194   0.00000   0.00000000 0.000000e+00

# 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")
#>         Node Bioregion Category         C          z
#> 1      Site1         1     site 0.8204159  0.5720776
#> 2      Site2         3     site 0.8254848  0.2070197
#> 3      Site3         1     site 0.8223140  0.5720776
#> 4      Site4         1     site 0.8254848 -0.8581163
#> 5      Site5         4     site 0.8223140 -0.7302967
#> 6      Site6         6     site 0.8264463  0.6437963
#> 7      Site7         6     site 0.8140496  0.6437963
#> 8      Site8         6     site 0.8027211  1.5021914
#> 9      Site9         1     site 0.8223140  0.5720776
#> 10    Site10         2     site 0.8204159  1.4031215
#> 11    Site11         2     site 0.8181818  1.4031215
#> 12    Site12         5     site 0.8204159  1.6561573
#> 13    Site13         3     site 0.8117914  1.6561573
#> 14    Site14         2     site 0.8223140  0.4677072
#> 15    Site15         5     site 0.8100000  0.2070197
#> 16    Site16         4     site 0.8033241 -0.7302967
#> 17    Site17         4     site 0.8150000 -0.7302967
#> 18    Site18         5     site 0.7977839  0.2070197
#> 19    Site19         3     site 0.8235294  0.2070197
#> 20    Site20         1     site 0.8200000 -0.8581163
#> 21  Species1         6  species 0.8333333 -0.2145988
#> 22  Species2         2  species 0.8096886 -1.4031215
#> 23  Species3         3  species 0.8096886 -1.2421180
#> 24  Species4         2  species 0.8266667 -0.4677072
#> 25  Species5         5  species 0.8096886  0.2070197
#> 26  Species6         6  species 0.8061224 -1.9313889
#> 27  Species7         3  species 0.8271605  0.2070197
#> 28  Species8         6  species 0.8027682 -0.2145988
#> 29  Species9         5  species 0.8000000  0.2070197
#> 30 Species11         2  species 0.8086420 -0.4677072
#> 31 Species12         6  species 0.8271605 -0.2145988
#> 32 Species13         1  species 0.8148148  0.5720776
#> 33 Species14         1  species 0.8199446  0.5720776
#> 34 Species15         3  species 0.8096886 -1.2421180
#> 35 Species16         1  species 0.8148148  0.5720776
#> 36 Species18         6  species 0.8235294 -0.2145988
#> 37 Species19         3  species 0.8027682  0.2070197
#> 38 Species20         4  species 0.7890625  1.0954451
#> 39 Species21         2  species 0.8166090 -0.4677072
#> 40 Species22         5  species 0.8096886 -1.2421180
#> 41 Species23         4  species 0.8199446  1.0954451
#> 42 Species24         1  species 0.7968750  0.5720776
#> 43 Species25         1  species 0.8194444 -2.2883102
#> 44 Species10         5  species 0.8163265 -1.2421180
#> 45 Species17         2  species 0.8304498 -0.4677072