EcoMetriQReference Book

12. Appendices

12.1 Appendix A: Formula summary

Measure Formula Source Code (alpha_beta_indices.py / spatial_analysis.py)
Shannon H' = -\sum p_i \ln p_i Shannon (1948) :125
Pielou J' = H'/\ln S Pielou (1966) :150
Gini-Simpson (plug-in) 1 - \sum p_i^2 Simpson (1949) :137
Simpson (unbiased) 1 - \sum n_i(n_i-1)/[N(N-1)] Simpson (1949) :143
Margalef (S-1)/\ln N Margalef (1958) :193
Menhinick S/\sqrt N Menhinick (1964) :199
Berger-Parker \max n_i / N Berger and Parker (1970) :209
Fisher's alpha S = \alpha \ln(1 + N/\alpha) Fisher et al. (1943) :215
Hill number {}^qD = (\sum p_i^q)^{1/(1-q)}; {}^1D = e^{H'} Hill (1973); Jost (2006) :255
Sample coverage C = 1 - f_1/N Good (1953) :304
Adjusted sample coverage 1 - \frac{f_1}{N}\frac{(N-1)f_1}{(N-1)f_1 + 2f_2} Chao and Jost (2012) :320
Chao1 (classic) S + f_1^2/(2f_2) Chao (1984) :355
Chao1 (bias-corrected) S + f_1(f_1-1)/[2(f_2+1)] Chao (2005) :363
Chao1 variance f_2[\frac12 r^2 + r^3 + \frac14 r^4], r = f_1/f_2 Chao (1987) :376
Log-normal interval [S + T/K,\; S + TK] Chao (1987) :413
ACE S_{\text{abund}} + S_{\text{rare}}/C_{\text{ace}} + f_1\gamma^2/C_{\text{ace}} Chao and Lee (1992) :464
Rao's Q \sum_{i\ne j} d_{ij} p_i p_j Rao (1982) :1339
Rarefaction E(S_n) = \sum[1 - \binom{N-n_i}{n}/\binom{N}{n}] Hurlbert (1971) :585
Rarefaction variance \sum a_i(1-a_i) + 2\sum_{i<j}(a_{ij} - a_i a_j) Heck et al. (1975) :594
Jaccard a/(a+b+c) Jaccard (1901) :817
Sørensen 2a/(2a+b+c) Sørensen (1948) :818
\beta_{SOR} / \beta_{SIM} / \beta_{SNE} \frac{b+c}{2a+b+c} / \frac{\min(b,c)}{a+\min(b,c)} / difference Baselga (2010) :840
Multiple-site Baselga §6.4.2 Baselga (2010, 2012) :868
Bray-Curtis \sum|x_A - x_B| / \sum(x_A + x_B) Bray and Curtis (1957) :933
Whittaker S_T/\bar S - 1 Whittaker (1960) :1099
Additive partitioning \beta = \gamma - \bar\alpha (equal weights) Lande (1996) :1105
Multiplicative partitioning \beta_q = \gamma_q/\alpha_q, \alpha_q a generalized mean Jost (2007) :1166
KDE \sum w_j (2\pi h^2)^{-1} e^{-d^2/2h^2} Wand and Jones (1995) :647
Bandwidth h = \sigma n^{-1/6} Wand and Jones (1995) :466
Gi* §8.5.2 Getis and Ord (1992) :795
BH correction \min_{l\ge k}(n p_{(l)}/l) Benjamini and Hochberg (1995) :1042
EOO Area of the convex hull in LAEA IUCN (2012) :1120
AOO occupied c \times c cells × c^2 IUCN (2012) :1139
Alpha shape Delaunay triangles with circumradius < 1/\alpha Edelsbrunner et al. (1983) :1330

12.2 Appendix B: Output key glossary

Alpha report

Key Meaning
Species Richness (S) Species richness
Total Individuals (N) Total number of individuals (records)
Shannon-Wiener (H') / Shannon Maximum (Hmax) Shannon entropy / its maximum value \ln S
Simpson Diversity (1-D, unbiased) Unbiased Simpson diversity
Gini-Simpson (plug-in, 1-sum p^2) Plug-in Gini-Simpson
Inverse Simpson (plug-in) Inverse Simpson = Hill D_2
Simpson Dominance (D, unbiased) Unbiased Simpson dominance
Margalef Richness (d) / Menhinick Richness Margalef / Menhinick richness
Pielou Evenness (J') Pielou evenness
Berger-Parker (d) Proportion of the most abundant species
Fisher Alpha Fisher's log-series alpha
D0_Richness (q=0), D1_Shannon_Equiv (q=1), D2_Simpson_Equiv (q=2) Hill numbers
Goods_Coverage (C) / Goods_Coverage_Adjusted Sample coverage / adjusted sample coverage
Singleton_Count (f1) / Doubleton_Count (f2) Number of singletons / doubletons
Chao1, Chao1 CI_lower_95, Chao1 CI_upper_95, Chao1 Variance Classic Chao1, its interval and variance
Chao1_bias_corrected, Chao1_bc_CI_lower_95, Chao1_bc_CI_upper_95 Bias-corrected Chao1 and its interval
ACE Estimate ACE
Rao_Q, Rao_Q_equivalent_numbers, Q_over_GiniSimpson Rao's Q, its equivalent number, its ratio to Gini-Simpson

Beta report

Key Meaning
Jaccard_Similarity / Sorensen_Similarity Jaccard / Sørensen similarity
Whittaker_Beta (pair) Whittaker beta for a pair (= \beta_{SOR})
Shared_Species, Only_<site>, Total_Species a, b/c, a+b+c
Baselga_Total_bsor, Baselga_Turnover_bsim, Baselga_Nestedness_bnes Sørensen dissimilarity and its components
Beta_Total_Whittaker Multiple-site Whittaker beta
Mean_Jaccard_Similarity Mean Jaccard similarity of the pairs
Multisite_Beta_Sorensen, Multisite_Turnover_sim, Multisite_Nestedness_nes Multiple-site Baselga
Shared_Term (sum Si - ST) Shared-species term in the multiple-site denominator

Gamma report

Key Meaning
Gamma_Species_Richness, Gamma_Shannon, Gamma_Simpson Pooled gamma measures
Gamma_Shannon_equal_weight Equal-weight gamma Shannon
Mean_Alpha_Richness, Mean_Alpha_Shannon, Mean_Alpha_Simpson Mean alpha
Gamma_S, Alpha_S_mean, Beta_S_additive, Beta_S_ratio Additive partitioning of richness
Gamma_H, Alpha_H_mean, Beta_H_additive, Beta_H_ratio Additive partitioning of Shannon
Gamma_D, Alpha_D_mean, Beta_D_additive, Beta_D_ratio Additive partitioning of Gini-Simpson
Gamma_Dq, Alpha_Dq_mean, Beta_Dq_multiplicative, Beta_Dq_normalized Multiplicative partitioning of order q
Unique_Species_Count, Gamma_Contribution_Ratio Number of species unique to the site, S_k/S_T

Spatial reports

Key Meaning
bandwidth_m, bandwidth_method, cell_size_m, grid_size, max_density KDE bandwidth, selection rule, cell size, grid, maximum density (records/m²)
Input records, Analysis units, Hotspots, Coldspots, Neutral, Isolated Number of input records, number of analysis units (points or occupied cells) and the classes
Distance band, WARNINGS Distance band used (with its rule if automatic) and warnings
gi_star, z_score, p_2tailed, p_adjusted, confidence, n_neigh, band_m Gi* layer attributes
EOO_km2, AOO_km2, AOO_km2_min, ..._threshold_status Areas (AOO_km2 at the grid origin at the projection center, AOO_km2_min the minimum) and threshold comparison
EOO_IUCN_Category, AOO_IUCN_Category Despite their names, not Red List categories but the same threshold comparison as ..._threshold_status
Cell_Count, Cell_Count_min, Cell_Count_max, Projection Occupied AOO cells, their range depending on the grid origin, and the LAEA projection used
Mean edge length, Alpha parameter, Radius threshold 1/alpha, Kept triangles Alpha shape details
ALPHA SENSITIVITY: x default, radius (m), area (km²) Radius and area at multiples of the default \alpha

12.3 Appendix C: Fixes in 1.1.1 and 1.1.2 and remaining limitations

While the first edition of this book was being written, EcoMetriQ 1.1.0 was run on real data, and a number of defects were identified in the interface, layer generation and the validation templates. Version 1.1.1 is a maintenance release that fixes these defects; the fixes of 1.1.2 are in §12.3.2. The formulas in the computation core did not change: all diversity and spatial values for the sample data are the same in the two versions (Chapter 9).

12.3.1 Fixed in 1.1.1

No. Behavior in 1.1.0 Behavior in 1.1.1 Section
C1 The Coordinate System selection was not used QGIS projection selector; coordinates are transformed to WGS84 on loading; a file with out-of-range coordinates is rejected 3.4
C2 Rows with a zero or negative count were counted as 1 Skipped as absence records and reported 3.3
C3 Unreadable rows were skipped silently Skipped rows are counted by reason; the window and the Processing log report them 3.3, 10.2
C4 Spurious "record count" warning in the manual table The warning is written only for a CSV without a count column 4.11
C6 No warning when the bootstrap interval excluded the observed H' The algorithm writes a warning 4.13, 10.3
C7 Export Table (CSV) wrote space-aligned text A real comma-separated CSV in long format 5.2
C8 The Data Source selection in the Gamma tab was not used The selection box was removed; the importer uses the same column names as the Data Input reader 7.2
C9 The Gi* window output did not state the change of analysis unit; the "Silverman×2" label was wrong Input records / Analysis units are written separately; WARNINGS section; the band rule is named correctly 8.5
C10 Location_Count showed the number of records The line was removed 8.6
C11 When the degrees box was unchecked, layers were written with EPSG:32636 The box was removed; layers use EPSG:4326 8.6
C12 The alpha shape layer was drawn empty when a ring was invalid Rings are repaired first; holes are kept 8.7
C13 The alpha box did not accept typical \alpha values The parameter is entered as the radius 1/\alpha in meters 8.7
C14 Alpha sensitivity was not shown The profile is written on every run 8.7
C15 The R templates and the comparator used different definitions and rounded values The template writes the two forms of Simpson under separate names; the comparison uses full precision; gamma Shannon is equal-weight; 18/18, 53/53 and 10/10 PASS on the example data 9.3-9.5
C16 The Validation tab description was outdated The text describes 10 data sets and 63 comparisons 9.2
C17 The toolbar button's icon file was missing icon.svg is used 2.3
C18 Data were lost when the window was closed and reopened The window is kept for the duration of the QGIS session 2.3
C19 With two candidate columns for one role, the choice was undefined Column names are matched in order of priority 3.3
C20 A semicolon-delimited CSV gave the "missing required columns" error The file is recognized and rejected with a clear message 3.3

12.3.2 Fixed in 1.1.2

Version 1.1.2 results from a systematic robustness test of 1.1.1 (malformed and extreme data, parameter extremes, invariants, timing with 12,000 records; 40 findings) and from the expert review of this book. On valid data, the alpha, beta, gamma, rarefaction, KDE, EOO, AOO and alpha-shape values, and the numbers of hot and cold spots, are the same as in 1.1.1 (checked on the sample data and on the cleaned data of the EMS manuscript). Outputs that change by design: the bootstrap interval (new resampling), BH-FDR p-values in the sixth decimal, and the Isolated label for locations without neighbors.

No. Behavior in 1.1.1 Behavior in 1.1.2 Section
D1 In Processing, KDE and EOO/AOO did not run at all with an empty "Species Filter" The parameter is optional; empty = all species 10.3
D2 Processing did not detect a wrong CRS (UTM metres were read as degrees) A file with out-of-range coordinates after transformation is refused 10.3
D3 Processing KDE ignored the count column; its surface differed from the dialog's Weights by count as the dialog does; the unit label says so 8.4, 10.3
D4 Processing gamma used other column names and crashed on a bad count cell Same column names and count rules as the dialog 7.2, 10.3
D5 inf/nan counts crashed, fractional counts were truncated (2.7 → 2), text counts were read as 1 The row is skipped and reported with its reason 3.3
D6 nan/inf coordinates were accepted Counted as unreadable coordinates 3.3
D7 Excel ANSI (Windows-1254) and tab-delimited files could not be read They are read; an encoding note is given 3.3
D8 In the beta import the column choice depended on the session, zero/negative counts were presences, names with commas were split Priority order; absence; ; separator 6.2.1
D9 In the manual table the same species counted as two species, invalid rows were dropped silently Rows are summed; skipped rows are reported 3.8, 4.11
D10 The alpha shape of three points was computed in degrees² (0 km²) Computed in the projection 8.7
D11 With S = N, Fisher's alpha gave a number of the order of 10^6 "undefined (S = N ...)" is written 4.4.3
D12 For data crossing the 180th meridian the projection center was wrong (band 3.9 times too large) Circular mean; results for ordinary data do not change 8.2
D13 Gi*: a location without neighbors could become a hotspot; equal values gave "Insufficient points"; BH used rounded p Isolated label and warning; explanatory message; full precision; threshold at most 0.10 8.5
D14 The R comparison reported "ALL MATCH" with nothing compared; a site name containing " x " crashed it "NO COMPARABLE METRICS"; fixed 9.3-9.5
D15 Non-square rows and missing pairs were accepted in the Rao matrix Refused 4.9.2
D16 Gamma_Chao1 (estimated max); "genuinely different"; rarefaction note from the nearest curve point; AOO note did not mention the minimum lower-bound estimate; sampling caution; exact last 10% and f_1/N; AOO_km2_min 5.4, 6.6, 7.3, 8.6
D17 With 12,000 records Gi* took 42-86 s; bootstrap grew linearly with N; rarefaction variance took 22-26 s at S = 400 k-d tree (1-2 s); multinomial resampling; sum over distinct count values (under 1 s) 8.5, 4.13, 5.3

12.3.3 Remaining limitations

No. Issue What to do Section
C5 The dissimilarity matrix for Rao's Q and the Shannon bootstrap can be given only in Processing Use the Processing algorithm 4.9, 10.3
C6 The bootstrap interval is biased for data with many singletons; 1.1.2 also only warns Do not report the interval when the warning appears 4.13
C21 The four tools in the Spatial tab share the same result box; only the last tool appears in the report Save the result separately after each tool 10.1
C22 There is no built-in test or R template for KDE, Gi*, EOO and AOO Make the independent comparison with spdep and sf 9.7

12.4 Appendix D: References

Bachman, S., Moat, J., Hill, A.W., de la Torre, J., Scott, B. (2011). Supporting Red List threat assessments with GeoCAT: geospatial conservation assessment tool. ZooKeys 150, 117-126. https://doi.org/10.3897/zookeys.150.2109

Baselga, A. (2010). Partitioning the turnover and nestedness components of beta diversity. Global Ecology and Biogeography 19, 134-143. https://doi.org/10.1111/j.1466-8238.2009.00490.x

Baselga, A. (2012). The relationship between species replacement, dissimilarity derived from nestedness, and nestedness. Global Ecology and Biogeography 21, 1223-1232. https://doi.org/10.1111/j.1466-8238.2011.00756.x

Baselga, A. (2013a). Multiple site dissimilarity quantifies compositional heterogeneity among several sites, while average pairwise dissimilarity may be misleading. Ecography 36, 124-128. https://doi.org/10.1111/j.1600-0587.2012.00124.x

Baselga, A. (2013b). Separating the two components of abundance-based dissimilarity: balanced changes in abundance vs. abundance gradients. Methods in Ecology and Evolution 4, 552-557. https://doi.org/10.1111/2041-210X.12029

Beck, J., Holloway, J.D., Schwanghart, W. (2013). Undersampling and the measurement of beta diversity. Methods in Ecology and Evolution 4, 370-382. https://doi.org/10.1111/2041-210x.12023

Benjamini, Y., Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society: Series B 57, 289-300. https://doi.org/10.1111/j.2517-6161.1995.tb02031.x

Berger, W.H., Parker, F.L. (1970). Diversity of planktonic foraminifera in deep-sea sediments. Science 168, 1345-1347. https://doi.org/10.1126/science.168.3937.1345

Bowman, A.W. (1984). An alternative method of cross-validation for the smoothing of density estimates. Biometrika 71, 353-360. https://doi.org/10.1093/biomet/71.2.353

Bray, J.R., Curtis, J.T. (1957). An ordination of the upland forest communities of southern Wisconsin. Ecological Monographs 27, 325-349. https://doi.org/10.2307/1942268

Burgman, M.A., Fox, J.C. (2003). Bias in species range estimates from minimum convex polygons: implications for conservation and options for improved planning. Animal Conservation 6, 19-28. https://doi.org/10.1017/S1367943003003044

Chao, A. (1984). Nonparametric estimation of the number of classes in a population. Scandinavian Journal of Statistics 11, 265-270.

Chao, A. (1987). Estimating the population size for capture-recapture data with unequal catchability. Biometrics 43, 783-791. https://doi.org/10.2307/2531532

Chao, A. (2005). Species estimation and applications. In: Kotz, S. et al. (eds.), Encyclopedia of Statistical Sciences, 2nd ed., Vol. 12, 7907-7916. Wiley, New York.

Chao, A., Chazdon, R.L., Colwell, R.K., Shen, T.-J. (2005). A new statistical approach for assessing similarity of species composition with incidence and abundance data. Ecology Letters 8, 148-159. https://doi.org/10.1111/j.1461-0248.2004.00707.x

Chao, A., Chiu, C.-H., Hsieh, T.C. (2012). Proposing a resolution to debates on diversity partitioning. Ecology 93, 2037-2051. https://doi.org/10.1890/11-1817.1

Chao, A., Jost, L. (2012). Coverage-based rarefaction and extrapolation: standardizing samples by completeness rather than size. Ecology 93, 2533-2547. https://doi.org/10.1890/11-1952.1

Chao, A., Lee, S.-M. (1992). Estimating the number of classes via sample coverage. Journal of the American Statistical Association 87, 210-217. https://doi.org/10.1080/01621459.1992.10475194

Colwell, R.K., Chao, A., Gotelli, N.J., Lin, S.-Y., Mao, C.X., Chazdon, R.L., Longino, J.T. (2012). Models and estimators linking individual-based and sample-based rarefaction, extrapolation and comparison of assemblages. Journal of Plant Ecology 5, 3-21. https://doi.org/10.1093/jpe/rtr044

Dauby, G., Stévart, T., Droissart, V., Cosiaux, A., Deblauwe, V., Simo-Droissart, M., Sosef, M.S.M., Lowry, P.P., Schatz, G.E., Gereau, R.E., Couvreur, T.L.P. (2017). ConR: an R package to assist large-scale multispecies preliminary conservation assessments using distribution data. Ecology and Evolution 7, 11292-11303. https://doi.org/10.1002/ece3.3704

Edelsbrunner, H., Kirkpatrick, D., Seidel, R. (1983). On the shape of a set of points in the plane. IEEE Transactions on Information Theory 29, 551-559. https://doi.org/10.1109/TIT.1983.1056714

Fisher, R.A., Corbet, A.S., Williams, C.B. (1943). The relation between the number of species and the number of individuals in a random sample of an animal population. Journal of Animal Ecology 12, 42-58. https://doi.org/10.2307/1411

Getis, A., Ord, J.K. (1992). The analysis of spatial association by use of distance statistics. Geographical Analysis 24, 189-206. https://doi.org/10.1111/j.1538-4632.1992.tb00261.x

Good, I.J. (1953). The population frequencies of species and the estimation of population parameters. Biometrika 40, 237-264. https://doi.org/10.1093/biomet/40.3-4.237

Gotelli, N.J., Colwell, R.K. (2001). Quantifying biodiversity: procedures and pitfalls in the measurement and comparison of species richness. Ecology Letters 4, 379-391. https://doi.org/10.1046/j.1461-0248.2001.00230.x

Heck, K.L., van Belle, G., Simberloff, D. (1975). Explicit calculation of the rarefaction diversity measurement and the determination of sufficient sample size. Ecology 56, 1459-1461. https://doi.org/10.2307/1934716

Hill, M.O. (1973). Diversity and evenness: a unifying notation and its consequences. Ecology 54, 427-432. https://doi.org/10.2307/1934352

Hsieh, T.C., Ma, K.H., Chao, A. (2016). iNEXT: an R package for rarefaction and extrapolation of species diversity (Hill numbers). Methods in Ecology and Evolution 7, 1451-1456. https://doi.org/10.1111/2041-210X.12613

Hurlbert, S.H. (1971). The nonconcept of species diversity: a critique and alternative parameters. Ecology 52, 577-586. https://doi.org/10.2307/1934145

IUCN (2012). IUCN Red List Categories and Criteria: Version 3.1, 2nd ed. IUCN, Gland and Cambridge.

IUCN Standards and Petitions Committee (2024). Guidelines for Using the IUCN Red List Categories and Criteria. Version 16. IUCN, Gland and Cambridge.

Jaccard, P. (1901). Distribution de la flore alpine dans le bassin des Dranses et dans quelques régions voisines. Bulletin de la Société Vaudoise des Sciences Naturelles 37, 241-272.

Jost, L. (2006). Entropy and diversity. Oikos 113, 363-375. https://doi.org/10.1111/j.2006.0030-1299.14714.x

Jost, L. (2007). Partitioning diversity into independent alpha and beta components. Ecology 88, 2427-2439. https://doi.org/10.1890/06-1736.1

Lande, R. (1996). Statistics and partitioning of species diversity, and similarity among multiple communities. Oikos 76, 5-13. https://doi.org/10.2307/3545743

Magurran, A.E. (2004). Measuring Biological Diversity. Blackwell, Oxford.

Margalef, R. (1958). Information theory in ecology. General Systems 3, 36-71.

Menhinick, E.F. (1964). A comparison of some species-individuals diversity indices applied to samples of field insects. Ecology 45, 859-861. https://doi.org/10.2307/1934933

Moat, J., Bachman, S.P., Field, R., Boyd, D.S. (2018). Refining area of occupancy to address the modifiable areal unit problem in ecology and conservation. Conservation Biology 32, 1278-1289. https://doi.org/10.1111/cobi.13139

Openshaw, S. (1984). The Modifiable Areal Unit Problem. Concepts and Techniques in Modern Geography 38. Geo Books, Norwich.

Ord, J.K., Getis, A. (1995). Local spatial autocorrelation statistics: distributional issues and an application. Geographical Analysis 27, 286-306. https://doi.org/10.1111/j.1538-4632.1995.tb00912.x

Pielou, E.C. (1966). The measurement of diversity in different types of biological collections. Journal of Theoretical Biology 13, 131-144. https://doi.org/10.1016/0022-5193(66)90013-0

Rao, C.R. (1982). Diversity and dissimilarity coefficients: a unified approach. Theoretical Population Biology 21, 24-43. https://doi.org/10.1016/0040-5809(82)90004-1

Ricotta, C., Szeidl, L. (2009). Diversity partitioning of Rao's quadratic entropy. Theoretical Population Biology 76, 299-302. https://doi.org/10.1016/j.tpb.2009.10.001

Rudemo, M. (1982). Empirical choice of histograms and kernel density estimators. Scandinavian Journal of Statistics 9, 65-78.

Shannon, C.E. (1948). A mathematical theory of communication. Bell System Technical Journal 27, 379-423. https://doi.org/10.1002/j.1538-7305.1948.tb01338.x

Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.

Simpson, E.H. (1949). Measurement of diversity. Nature 163, 688. https://doi.org/10.1038/163688a0

Snyder, J.P. (1987). Map Projections: A Working Manual. U.S. Geological Survey Professional Paper 1395. Washington, DC. https://doi.org/10.3133/pp1395

Sørensen, T. (1948). A method of establishing groups of equal amplitude in plant sociology based on similarity of species content. Biologiske Skrifter 5, 1-34.

Veech, J.A., Summerville, K.S., Crist, T.O., Gering, J.C. (2002). The additive partitioning of species diversity: recent revival of an old idea. Oikos 99, 3-9. https://doi.org/10.1034/j.1600-0706.2002.990101.x

Wand, M.P., Jones, M.C. (1995). Kernel Smoothing. Chapman & Hall, London.

Whittaker, R.H. (1960). Vegetation of the Siskiyou Mountains, Oregon and California. Ecological Monographs 30, 279-338. https://doi.org/10.2307/1943563

Worton, B.J. (1989). Kernel methods for estimating the utilization distribution in home-range studies. Ecology 70, 164-168. https://doi.org/10.2307/1938423