EcoMetriQReference Book

6. Beta diversity (Beta Diversity)

Tab: 🔀 Beta Diversity · Code: ui/main_dialog.py:801-1239 (interface), modules/alpha_beta_indices.py:787-968 BetaDiversity (computation)

6.1 What this tab does

Beta diversity is the difference in species composition between sites. Two sites may have the same number of species yet hold completely different species; or the species of the poorer site may be a subset of those of the richer site. This tab computes:

All measures except Bray-Curtis are computed from presence/absence; species counts are not used. They therefore do not suffer from treating record counts as abundances (§3.5), but under incomplete and unequal sampling unrecorded species inflate turnover (§6.4).

6.2 Screen and parameters

Figure 6.1. The whole Beta Diversity tab, empty. Top: import from CSV; middle: manual site definition (the default five-park example), Bray-Curtis fields, the compute button and the result box.
Figure 6.1. The whole Beta Diversity tab, empty. Top: import from CSV; middle: manual site definition (the default five-park example), Bray-Curtis fields, the compute button and the result box.
Name in the interface What it does Default Code
Path box + Browse Selects a CSV with a site column empty ui/main_dialog.py:832-839
📂 Use Data Input File Takes the path of the file in Data Input and imports it immediately - ui/main_dialog.py:955-963
Site column name: Name of the site column site ui/main_dialog.py:847-853
📥 Import Sites from CSV Reads the file, fills the manual site box and the Bray-Curtis fields - ui/main_dialog.py:966-1088
✏️ Manual Site Definition One site per line: SiteName: species1, species2, … five-park example ui/main_dialog.py:867-899
🗑 Clear Empties the manual site box - ui/main_dialog.py:893-898
Site A / Site B (species:count, …) Manual Bray-Curtis input for two sites empty ui/main_dialog.py:901-917
🔢 Compute Beta Diversity Computes - ui/main_dialog.py:1090-1239
💾 Export Results (TXT) Saves the result - ui/main_dialog.py:936-941

6.2.1 Import rules

The importer reads the CSV with its own reader (ui/main_dialog.py:966-1089):

A species set is extracted for each site and written into the manual site box in alphabetical order; the previous content of the box is deleted. If there is a count column, the species abundances of each site are also stored and the first two sites are written into the Site A / Site B boxes. If fewer than two sites are found, the warning "Beta diversity requires at least 2 sites." is shown. The status line states how many sites and how many pairs will be computed:

✓ 5 sites imported  |  10 pairwise comparisons will be computed

The computation is always made from the text in the manual site box (ui/main_dialog.py:1090-1113). If you edit the box after importing (e.g. delete a site), the computation uses the edited version.

Figure 6.2. After the sample data have been imported with Use Data Input File. The manual site box is filled with the species lists of the five sub-watersheds; because the sample data have no count column, the Bray-Curtis fields remain empty.
Figure 6.2. After the sample data have been imported with Use Data Input File. The manual site box is filled with the species lists of the five sub-watersheds; because the sample data have no count column, the Bray-Curtis fields remain empty.

6.3 Pairwise measures

For two sites: a = number of shared species, b = species only in the first site, c = species only in the second site (modules/alpha_beta_indices.py:796-865).

Report line Formula Range Meaning
Jaccard_Similarity J = \dfrac{a}{a+b+c} 0 - 1 shared proportion of the combined list (Jaccard 1901)
Sorensen_Similarity S_{\text{Sør}} = \dfrac{2a}{2a+b+c} 0 - 1 double weight on shared species (Sørensen 1948)
Whittaker_Beta \dfrac{a+b+c}{(2a+b+c)/2} - 1 0 - 1 Whittaker (1960) beta for a pair
Shared_Species a
Only_<site> b, c
Total_Species a+b+c
Baselga_Total_bsor \beta_{SOR} = \dfrac{b+c}{2a+b+c} 0 - 1 Sørensen dissimilarity
Baselga_Turnover_bsim \beta_{SIM} = \dfrac{\min(b,c)}{a+\min(b,c)} 0 - 1 turnover (species replacement)
Baselga_Nestedness_bnes \beta_{SNE} = \beta_{SOR} - \beta_{SIM} 0 - 1 dissimilarity due to nestedness

For two sites, Whittaker beta equals Sørensen dissimilarity: \frac{a+b+c}{(2a+b+c)/2} - 1 = \frac{b+c}{2a+b+c} = \beta_{SOR}. This is why two lines of the report show the same number. If \beta_{SNE} comes out negative because of rounding, it is set to zero.

How is the Baselga partitioning read? Sørensen dissimilarity arises from two sources (Baselga 2010):

If \beta_{SIM} is large, the sites really hold different species, and each site has its own conservation value. If \beta_{SNE} is large, the poorer sites are "incomplete copies" of the richer site; protecting the richer site protects most of the species.

6.3.1 A hand calculation

Aksu and Boğaçay in the sample data: a = 55, b = 361, c = 70.

J = \frac{55}{486} = 0.1132 \qquad S_{\text{Sør}} = \frac{110}{541} = 0.2033 \qquad \beta_{SOR} = \frac{431}{541} = 0.7967
\beta_{SIM} = \frac{\min(361, 70)}{55 + 70} = \frac{70}{125} = 0.56 \qquad \beta_{SNE} = 0.7967 - 0.56 = 0.2367

Program output:

  ┌─ aksu_cayi x bogacay_
  │  Jaccard_Similarity                     0.1132
  │  Sorensen_Similarity                    0.2033
  │  Whittaker_Beta                         0.7967
  │  Shared_Species                         55
  │  Only_aksu_cayi                         361
  │  Only_bogacay_                          70
  │  Total_Species                          486
  │  Baselga_Turnover_bsim                  0.56
  │  Baselga_Nestedness_bnes                0.2367
  │  Baselga_Total_bsor                     0.7967

6.3.2 All pairs

Pair Shared J S_{\text{Sør}} \beta_{SIM} \beta_{SNE} \beta_{SOR}
Aksu × Boğaçay 55 0.1132 0.2033 0.5600 0.2367 0.7967
Aksu × Köprüçay 78 0.1592 0.2746 0.4868 0.2385 0.7254
Aksu × Kırkgöz-Düden 74 0.1442 0.2521 0.5673 0.1806 0.7479
Aksu × Manavgat 76 0.1459 0.2546 0.5801 0.1653 0.7454
Boğaçay × Köprüçay 31 0.1260 0.2238 0.7520 0.0242 0.7762
Boğaçay × Kırkgöz-Düden 40 0.1562 0.2703 0.6800 0.0497 0.7297
Boğaçay × Manavgat 33 0.1209 0.2157 0.7360 0.0483 0.7843
Köprüçay × Kırkgöz-Düden 37 0.1294 0.2291 0.7566 0.0143 0.7709
Köprüçay × Manavgat 43 0.1483 0.2583 0.7171 0.0246 0.7417
Kırkgöz-Düden × Manavgat 44 0.1429 0.2500 0.7427 0.0073 0.7500

Interpretation. Similarities are low (Jaccard 0.11 - 0.16): in each pair, only 11 - 16% of the combined species list is shared. In all ten pairs, turnover is larger than nestedness. Nestedness is noticeable only in the four pairs that include Aksu (0.17 - 0.24): Aksu is the richest watershed (416 species) and contains part of the species of the other watersheds. However, as seen in §5.5, Aksu's richness comes largely from sampling effort; the nestedness in the Aksu pairs is therefore partly a product of the difference in the number of records.

6.4 Multi-site measures

The OVERALL BETA & NESTEDNESS ANALYSIS section of the report evaluates all sites together (modules/alpha_beta_indices.py:868-968).

6.4.1 Whittaker beta and mean Jaccard

\beta_W = \frac{S_T}{\bar S} - 1 \qquad \bar S = \frac{1}{m}\sum_{k=1}^{m} S_k

S_T is the combined species pool, \bar S the mean site richness and m the number of sites (Whittaker 1960). \beta_W lies between 0 (all sites identical) and m - 1 (no shared species). Mean_Jaccard_Similarity is the arithmetic mean of the Jaccard similarities of all pairs.

6.4.2 Baselga multi-site Sørensen partitioning

With S_k the richness of site k, and b_{ij} and b_{ji} the numbers of species found only in i and only in j in a pair:

\beta_{SOR} = \frac{\sum_{i<j} \min(b_{ij}, b_{ji}) + \sum_{i<j} \max(b_{ij}, b_{ji})}{2\left(\sum_k S_k - S_T\right) + \sum_{i<j} \min(b_{ij}, b_{ji}) + \sum_{i<j} \max(b_{ij}, b_{ji})}
\beta_{SIM} = \frac{\sum_{i<j} \min(b_{ij}, b_{ji})}{\left(\sum_k S_k - S_T\right) + \sum_{i<j} \min(b_{ij}, b_{ji})} \qquad \beta_{SNE} = \beta_{SOR} - \beta_{SIM}

Source: Baselga (2010, eqs. 4-6; 2012). This definition is the same as betapart::beta.multi(index.family = "sorensen"). The shared-species term in the denominator is \sum_k S_k - S_T; it is not the sum of the pairwise numbers of shared species. The two coincide only if no species occurs at three or more sites (modules/alpha_beta_indices.py:886-889).

In the sample data:

  Beta_Total_Whittaker                       2.3206
  Mean_Jaccard_Similarity                    0.1386
  Total_Species_Pool                         694
  Mean_Site_Richness                         209.0
  Number_of_Sites                            5
  Multisite_Beta_Sorensen                    0.8181
  Multisite_Turnover_sim                     0.7339
  Multisite_Nestedness_nes                   0.0842
  Shared_Term (sum Si - ST)                  351

\sum S_k = 416 + 125 + 152 + 171 + 181 = 1{,}045, S_T = 694, shared term 1{,}045 - 694 = 351. \beta_W = 694/209 - 1 = 2.32 (it can be at most 4).

Interpretation. The multi-site Sørensen dissimilarity is 0.82; 0.73 of it comes from turnover and 0.08 from nestedness: about 90% of the dissimilarity is due to species replacing one another from watershed to watershed. For conservation, this means that no single watershed can represent the regional flora. This result must be read with care: sub-watershed sample coverage ranges from 0.30 (Köprüçay) to 0.79 (Aksu), and per-site Chao1 is 1.6-4.4 times the observed richness. Species present but unrecorded in a watershed appear as replacement in \beta_{SIM} (Beck et al. 2013), so the turnover of 0.73 is an upper bound. Compare sites after rarefying to equal record numbers (betapart::beta.sample) or with estimators that account for unseen shared species (Chao et al. 2005). The multi-site value is not the mean of the pairwise values; Baselga (2013a) shows that the multi-site measure captures patterns of sharing among three or more sites that the pairwise mean misses.

6.5 Bray-Curtis

BC_{AB} = \frac{\sum_i |x_{iA} - x_{iB}|}{\sum_i (x_{iA} + x_{iB})}

Source: Bray and Curtis (1957). Code: modules/alpha_beta_indices.py:933-938. 0 means identical composition and abundance, 1 means no shared species.

Bray-Curtis with record counts

Using the number of records as the count column (e.g. adding count = 1 to every row) makes Bray-Curtis sensitive to differences in sampling effort: a site with many records looks different even if it holds the same species. For record data, use presence/absence measures.

6.6 The interpretation section of the report

  INTERPRETATION
  High Whittaker beta — strong species turnover among sites.
  Multi-site beta is driven 90% by species replacement (turnover) and 10% by nestedness.
  → Mainly species replacement among sites. With incomplete sampling, species present but
    unrecorded also appear as replacement, so check sampling coverage before reading this
    as different assemblages.

The interpretation is generated with the following rules (ui/main_dialog.py:1180-1237):

  1. Level according to multi-site Whittaker beta: < 0.2 very low, < 0.5 low, < 1.0 moderate, \ge 1.0 high.
  2. The turnover and nestedness shares are converted to percentages as \beta_{SIM}/(\beta_{SIM}+\beta_{SNE}) and \beta_{SNE}/(\beta_{SIM}+\beta_{SNE}).
  3. If the level is "moderate" or "high" and one share exceeds 60%, the concluding sentence is built around that component; if the level is low, the difference is described as "negligible". When turnover dominates, the program writes the caution: "Mainly species replacement among sites. With incomplete sampling, species present but unrecorded also appear as replacement, so check sampling coverage before reading this as different assemblages." Version 1.1.1 wrote "Sites have genuinely different species assemblages." in this case; that sentence ignores sampling adequacy and should not be used for sites with low sample coverage.

The interpretation thresholds are not based on any source

The 0.2 / 0.5 / 1.0 thresholds are the program's reading rules. Because the upper limit of \beta_W grows with the number of sites (m - 1), the same threshold means different things in a two-site and a ten-site study. In publications, report the numbers and the partitioning, not the threshold label.

Figure 6.3. End of the result box after the computation: multi-site measures and interpretation.
Figure 6.3. End of the result box after the computation: multi-site measures and interpretation.

6.7 Common mistakes

6.8 Expert questions

Q1. Does it give the same result as betapart? Yes. Pairwise \beta_{SIM}, \beta_{SNE} and \beta_{SOR} are the same as betapart::beta.pair(..., "sorensen"), and the multi-site values are the same as betapart::beta.multi(..., "sorensen"). With the sample data, the R comparison in the Validation tab gives PASS for all 53 of 53 values (Section 9.4).

Q2. Is there a Jaccard-family partitioning (\beta_{JTU}, \beta_{JNE})? No. EcoMetriQ partitions only the Sørensen family. For the Jaccard family, use betapart (index.family = "jaccard").

Q3. Is there an abundance-based partitioning (Baselga 2013b, the balanced variation and abundance gradient components of Bray-Curtis)? No. Bray-Curtis is given as a single value.

Q4. How do I test whether the difference is significant? EcoMetriQ gives no test or confidence interval for beta values. To remove the effect of differences in sample size, you can use betapart::beta.sample to resample the sites repeatedly down to an equal number of species or records.

Q5. Why is the multi-site \beta_{SOR} larger than the mean of the pairwise values? The multi-site measure also takes into account species found at three or more sites; the pairwise mean loses this information. In the sample data, the mean pairwise \beta_{SOR} is 0.76 and the multi-site value is 0.82. Baselga (2013a) recommends the multi-site measure for comparisons.