Skip to contents

Conservation planning asks more of a species-area relationship than how many species a region holds: which parts of the region carry species found nowhere else, how much richness is lost when habitat is split into patches, and how much of the apparent richness of a region reflects how intensively it was surveyed. This article answers these questions on one simulated region with endemism-area curves, the diversity-area relationship, the species-fragmented area relationship (SFAR) and the sampling-effort corrected species-area relationship (SESARS). Installation is covered in Get started; the plots need ggplot2. Maps of per-site accumulation metrics are in Mapping per-site metrics and wavefronts.

  1. Track endemic species as the area grows with spaccEndemism().

  2. Fit a power law of diversity against cumulative area with dar().

  3. Add a fragmentation term with sfar() or an effort term with sesars().

Example

Simulating range-size variation

The simulated region holds 80 sites scattered over a 100 by 100 unit square and 40 species. Each species occupies a Gaussian neighbourhood around a random centre: its occurrence probability at a site is \(e^{-s r^2}\), where \(r\) is the distance to the centre and \(s\) (spread) sets the range size. A large spread confines a species to a tight cluster near its centre; a small one lets it spill across the region.

The first 10 species use spread = 0.005, a distance of about 12 units (an eighth of the map edge) at which the occurrence probability halves. These are the endemics: tight clusters that vanish if their corner of the map is dropped. The other 30 species use spread = 0.001, a half-probability distance near 26 units, so they appear across much of the region. This split is the ground truth the analyses below recover.

Simulation code
set.seed(42)
n_sites <- 80
n_species <- 40

coords <- data.frame(
  x = runif(n_sites, 0, 100),
  y = runif(n_sites, 0, 100)
)

species <- matrix(0L, n_sites, n_species)
for (sp in seq_len(n_species)) {
  cx <- runif(1, 10, 90)
  cy <- runif(1, 10, 90)
  spread <- if (sp <= 10) 0.005 else 0.001
  prob <- exp(-spread * ((coords$x - cx)^2 + (coords$y - cy)^2))
  species[, sp] <- rbinom(n_sites, 1, prob)
}
colnames(species) <- paste0("sp", seq_len(n_species))

species is an 80 by 40 presence-absence matrix and coords holds the site positions in columns x and y. Mean occupancy, the number of sites per species, for the two groups:

range_size <- colSums(species)
tapply(range_size, c(rep("endemic", 10), rep("widespread", 30)), mean)
#>    endemic widespread 
#>    4.50000   18.46667

The narrow-ranged group occupies fewer sites, as designed. The contrast is moderate: endemics are not single-site rarities, and widespread species do not occupy every site.

Tracking endemic species

A species is endemic to an accumulated set of sites when every one of its occurrences falls inside that set. spaccEndemism() runs a nearest-neighbour accumulation from each of n_seeds random starts and, at each step, counts the species that are endemic to the sites accumulated so far (Endemism-area curves gives the definition). The printed final mean endemism equals total richness, because once every site is included every species is contained.

end <- spaccEndemism(species, coords, n_seeds = 20, progress = FALSE,
                     seed = 1)
end
#> spacc endemism: 80 sites, 40 species, 20 seeds
#> Final mean endemism: 40.0 species (100% of total)

summary() returns the curve as a data frame with mean richness, mean endemism, a percentile band for endemism and the endemism proportion, the share of accumulated species whose occurrences all lie in the area sampled so far.

es <- summary(end)
es[c(1, 10, 20, 40, 60, 80),
   c("sites", "mean_richness", "mean_endemism", "endemism_proportion")]
#>    sites mean_richness mean_endemism endemism_proportion
#> 1      1          8.10          0.00          0.00000000
#> 10    10         23.80          0.50          0.02100840
#> 20    20         30.20          1.45          0.04801325
#> 40    40         36.05          5.05          0.14008322
#> 60    60         39.00         14.15          0.36282051
#> 80    80         40.00         40.00          1.00000000
plot(end)

Total richness and endemic species count against sites accumulated; endemic species stay low until late in the accumulation and then rise to meet total richness. 0 10 20 30 40 0 20 40 60 80 Sites accumulated Species count Total richness Endemic species Spatial Endemism Accumulation

Endemic species stay rare until late in the accumulation: half a species after 10 sites, five after 40 (14% of the 36 species seen by then), and the remaining 26 within the last 20 sites. Most species here are widespread and occupy 18 sites on average, so few of them have all their occurrences inside any part of the region until most of it is included. A pool of narrow endemics would give a curve that follows total richness much earlier (Endemism-area curves).

Fitting the diversity-area relationship

dar() relates diversity to the area covered along the same site orders as the accumulation curve and fits the power law \(D = c A^z\) to the mean curve (Ma 2018). The default area_method = "convex_hull" measures the area of the convex hull of the first \(k\) sites, which is 0 until three sites span a polygon; "voronoi" sums their Voronoi cells and "count" uses the number of sites. Areas are in squared coordinate units. A spacc object gives the species-area relationship.

sac <- spacc(species, coords, n_seeds = 20, progress = FALSE, seed = 1)
area_fit <- dar(sac)
area_fit
#> spacc DAR: 80 sites, 20 seeds (from spacc)
#> Area method: convex_hull
#> Power law D = c * A^z:
#>   richness: z = 0.207
coef(area_fit)
#>     metric        c         z
#> 1 richness 6.363862 0.2068925
plot(area_fit, log_scale = TRUE)

Species richness against cumulative convex-hull area on logarithmic axes, with a confidence band. 10 20 30 100 1000 10000 Cumulative area Diversity Metric richness Diversity-Area Relationship (DAR)

The exponent z is the slope of log mean diversity against log mean area over the steps where both are positive, and coef() returns \(c\) and \(z\) for each curve. Richness grows with convex-hull area with \(z = 0.21\).

A site-by-species matrix passed to dar() goes through spaccHill() first and gives one relationship per Hill order q (default c(0, 1, 2)). Order \(q = 0\) recovers the classic species-area relationship (Arrhenius 1921), \(q = 1\) shows how the diversity of common species scales and \(q = 2\) how the diversity of dominant species scales. The Hill numbers themselves are covered in Accumulating Hill numbers and partitioning diversity. Abundance data suit the higher orders best; the presence-absence matrix here gives each species a weight equal to the number of accumulated sites it occupies.

area_hill <- dar(species, coords, q = c(0, 1, 2), n_seeds = 20,
                 progress = FALSE, seed = 1)
coef(area_hill)
#>   metric        c         z
#> 1   q0.0 6.363862 0.2068925
#> 2   q1.0 5.091818 0.2101282
#> 3   q2.0 4.139815 0.2218583
plot(area_hill, log_scale = TRUE)

Hill numbers of order 0, 1 and 2 against cumulative convex-hull area on logarithmic axes, one line with a band per order. 5 10 30 100 1000 10000 Cumulative area Diversity Order q = 0 q = 1 q = 2 Diversity-Area Relationship (DAR)

Order 0 reproduces the exponent of the spacc object above, because both runs use the same seed. The three exponents lie between 0.21 and 0.22, so on logarithmic axes the curves rise nearly in parallel.

Curves that diverge across orders show that evenness, as well as richness, changes with spatial extent. If the three curves rise in parallel, evenness is roughly constant across scales and richness alone carries the spatial signal. If the higher-order curves flatten earlier than the richness curve, common and dominant species saturate first while rare species keep accumulating, the usual pattern for aggregated communities. A steep \(z\) at order 0 with a shallow \(z\) at order 2 marks a community where rare species drive the area effect, the case where a richness estimate from a small plot most understates the regional total (Extrapolating curves and predicting richness).

dar() also takes a curve object computed earlier, so the area scaling of other facets comes from the same site orders as the curve itself: dar(spaccFunc(...)) gives one relationship per functional metric and dar(spaccPhylo(...)) one per phylogenetic metric (Accumulating phylogenetic and functional diversity). Functional richness, dispersion and other facets can scale with area differently from richness (Dias et al. 2025). Redundancy curves are accepted as well.

Separating fragmentation from area

sfar() needs a fitted spacc object and a vector assigning each site to a habitat fragment. The patches here come from k-means clustering of the coordinates, a stand-in for mapped habitat patches. Every accumulation step of every seed is treated as one landscape: its area is the number of sites accumulated, and its degree of fragmentation is the metapopulation capacity \(\lambda\) of the fragments those sites lie in (SFAR and SESARS models). dispersal is the average dispersal distance of the species in coordinate units. It has no default, because it belongs to the taxon: Hanski et al. (2013) took 300 m for forest birds from independent field data. The simulated species have no dispersal of their own, so the example assumes 10 units, a tenth of the map edge.

set.seed(123)
patches <- kmeans(coords, centers = 5)$cluster

sfar_fit <- sfar(sac, patches, dispersal = 10)
sfar_fit
#> SFAR: Species-Fragmented Area Relationship
#> -------------------------------------------- 
#> Fragments: 5
#> Dispersal distance: 10
#> R-squared: 0.693
#> 
#> Model: S = 13.77 * A^0.255 * exp(-0.01402 / lambda)
#> Fragmentation effect (b): 0.01402
#>   Fragmentation reduces richness beyond area loss

The coefficients are in $coef: log_c is the log-scale intercept, z the area exponent and b the fragmentation coefficient, positive when landscapes of low capacity hold fewer species than their area predicts. $data holds one row per fitted landscape.

round(sfar_fit$coef, 3)
#> log_c     z     b 
#> 2.623 0.255 0.014
head(sfar_fit$data, 4)
#>    seed area richness n_fragments  capacity
#> 7     1    7       14           2 0.4577546
#> 8     1    8       18           2 1.1431954
#> 9     1    9       18           2 1.1916468
#> 10    1   10       18           2 1.0752562
plot(sfar_fit)

Mean accumulated richness against cumulative sites, with the fitted area-plus-fragmentation prediction drawn as a line. 20 30 40 0 20 40 60 80 Cumulative sites (area proxy) Species richness z = 0.255, b = 0.01402, 5 fragments Species-Fragmented Area Relationship (SFAR)

The area exponent is \(z = 0.26\) and the fragmentation coefficient \(b = 0.014\) is positive. How much the fragmentation term adds shows in a comparison with a power law in area alone, fitted to the same landscapes.

sar_only <- lm(log(richness) ~ log(area), data = sfar_fit$data)
round(c(sar = summary(sar_only)$r.squared, sfar = sfar_fit$r_squared), 4)
#>    sar   sfar 
#> 0.6922 0.6926
summary(sfar_fit$data$capacity)
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>  0.1602 12.2464 28.3622 32.8803 56.3053 70.0696

The fragmentation term raises \(R^2\) only from 0.6922 to 0.6926. The capacity runs from 0.16 to about 70 with a median near 28, so \(1/\lambda\) is far from zero only in the landscapes of a few sites at the start of each order, and the term mostly describes those first steps.

The dispersal distance enters every capacity through the kernel, so b is read for that distance only. A longer distance connects the fragments more strongly, raises every capacity and changes the coefficient that fits them.

sapply(c(5, 10, 25, 50, 100), function(d) {
  round(unname(sfar(sac, patches, dispersal = d)$coef["b"]), 3)
})
#> [1] 0.004 0.014 0.165 0.265 0.329

Between 5 and 100 units the coefficient grows from 0.004 to 0.33, about eightyfold, while the data stay the same. The k-means patches are an arbitrary partition of a continuous surface, so the positive \(b\) is no evidence of a fragmentation effect in this region. The informative case is a set of isolated habitat patches, where landscapes of similar area differ in how small and how far apart their fragments are; \(b\) then measures how much richness the poorly connected landscapes lose.

Correcting for survey effort

sesars() takes a fitted spacc object and one effort value per site (visits, hours, trap-nights). Effort here is drawn from a Poisson distribution, mimicking a survey where some sites received more visits than others. Every accumulation step of every seed is one observation: the richness of the first \(k\) sites of that order, \(k\) as the area proxy, and the summed effort of exactly those \(k\) sites.

set.seed(7)
effort <- rpois(n_sites, 10) + 1

sesars_fit <- sesars(sac, effort)
sesars_fit
#> SESARS: Sampling Effort Species-Area Relationship
#> ------------------------------------------------ 
#> Model: power
#> R-squared: 0.740
#> 
#> Coefficients:
#>   log_c       z       w 
#>  3.8194  0.9538 -0.6137 
#> 
#> Interpretation: S = 45.58 * A^0.954 * E^-0.614

The coefficients are in $coef: log_c (or c under model = "additive"), the area exponent z and the effort exponent, named w in the object and \(e\) in SFAR and SESARS models. $r_squared reports how much of the richness variation the joint area-and-effort model captures.

round(sesars_fit$coef, 3)
#>  log_c      z      w 
#>  3.819  0.954 -0.614
sesars_fit$r_squared
#> [1] 0.7400357
plot(sesars_fit)

Mean accumulated richness against cumulative sites, with the area-plus-effort prediction drawn as a line. 10 20 30 40 0 20 40 60 80 Cumulative sites (area proxy) Species richness Model: power, R2 = 0.740 SESARS: Effort-Corrected Species-Area Relationship

The joint model explains 74% of the variation in richness over the 1600 observations (20 seeds times 80 steps), yet its exponents cannot be read separately: \(z = 0.95\) and \(w = -0.61\) have opposite signs, although effort was drawn independently of the species data and has no effect to find. The effort range, the correlation between the two predictors and a power law in area alone show why.

range(effort)
#> [1]  6 19
cor(log(sesars_fit$data$area), log(sesars_fit$data$effort))
#> [1] 0.9978395
coef(lm(log(richness) ~ log(area), data = sesars_fit$data))
#> (Intercept)   log(area) 
#>   2.3036327   0.3392383

Effort spans only 6 to 19 visits, about 3-fold and below the 10-fold range in Practical guidance. Each added site then brings a similar amount of effort, so the cumulative effort of an order stays nearly proportional to its number of sites, the case Azovsky (2011) calls proportional sampling. The two log predictors are correlated at 0.998 and the fit trades one exponent against the other: area alone gives \(z = 0.34\), and the joint fit splits that slope into 0.95 and \(-0.61\).

The informative case is a field dataset where under-surveyed regions are also species-poor in the raw counts. There the uncorrected species-area relationship reads the low richness of sparsely visited sites as an area effect, and when effort and area are correlated it absorbs the effort signal into \(z\) and inflates it. A positive effort exponent then measures how far apparent richness rises with survey intensity independently of area, and the area exponent net of effort is the quantity comparable across regions surveyed at different intensities.

Thinning clustered sites before a fit

Nearby sites share species, so a cluster of sites inflates the apparent accumulation rate and biases the area exponent. subsample() thins the network before the curve is built; grid thinning keeps one random site per occupied cell.

keep <- subsample(coords, method = "grid", cell_size = 20, seed = 1)
length(keep)
#> [1] 24
sac_thin <- spacc(species[keep, ], coords[keep, ], n_seeds = 20,
                  progress = FALSE, seed = 1)

The returned row indices subset the species matrix and the coordinates alike. The three thinning methods and the choice of cell size are covered in Rarefying to equal effort.

Endemism-area curves

The species-area relationship counts how richness grows with area; the endemism-area relationship counts, of the species present in an accumulated set of sites, how many occur only within that set. Let \(S(A)\) be the richness accumulated over area \(A\). At each accumulation step \(k\) along the visit order, a species with cumulative occurrence count \(a_k\) and total occurrence count \(t\) is endemic when \(a_k = t\) and \(a_k > 0\). The endemic count \(E(A)\) rises as narrow-ranged species are captured and reaches total richness only when every site is included.

The diagnostic value lies at intermediate area. A site set that holds many endemic species is irreplaceable: those species disappear from a protected network if the set is dropped. Endemism concentrated in small areas marks a setting where reserve placement matters more than reserve size (Kier et al. 2009).

The shape of \(E(A)\) carries information beyond its endpoints. A curve that climbs slowly and catches up with richness only near full extent describes a pool of widespread species with diffuse ranges, where almost no area is irreplaceable until nearly everything is included. A curve that tracks richness closely from the start describes a pool of narrow endemics, where even small areas hold their full complement of locally restricted species. The endemism proportion \(E(A)/S(A)\) puts this on one axis: the fraction of the accumulated species pool that is local to the area sampled.

The curve follows a growing area; a single site can be scored as well. spaccEndemism(map = TRUE) adds the endemism richness of each site (Kier et al. 2009), in which every species is shared out equally among the sites it occupies and a site sums the shares it holds. It is mapped in Mapping per-site metrics and wavefronts.

SFAR and SESARS models

Habitat loss and habitat fragmentation are distinct processes. Removing area reduces richness through the classic power law. Splitting the remaining area into more, smaller pieces reduces it further, through edge effects, isolation and minimum viable area. The SFAR (Hanski et al. 2013; Rybicki & Hanski 2013) separates the two by multiplying the richness that the power law predicts for contiguous habitat with the fraction of species expected to persist at a given degree of fragmentation,

\[ S = c A^{z} e^{-b/\lambda}, \qquad \log(S) = \log(c) + z \log(A) - \frac{b}{\lambda}, \]

where \(S\) is species richness, \(A\) is total habitat area, \(z\) is the area exponent of the species-area relationship, \(c\) is the richness expected at unit area in unfragmented habitat, \(\lambda\) is the metapopulation capacity of the landscape and \(b\) is the fragmentation coefficient. A positive \(b\) means that, at equal area, a landscape of lower capacity supports fewer species; as \(\lambda\) grows the factor \(e^{-b/\lambda}\) approaches 1 and the model returns to the power law.

The metapopulation capacity measures how well a set of fragments can sustain a species that lives as a network of local populations. It is the leading eigenvalue of the matrix with elements \(m_{ii} = 0\) and

\[ m_{ij} = A_i^{x} A_j^{y} f(d_{ij}), \qquad f(d) = \max\left(e^{-\alpha d},\, 0.01\right), \]

where \(A_i\) is the area of fragment \(i\), \(d_{ij}\) is the distance between the centroids of fragments \(i\) and \(j\), and \(1/\alpha\) is the average dispersal distance (dispersal). The exponents \(x\) and \(y\) scale the effect of fragment area on extinction, immigration and emigration; scaling = c(1.5, 1), the default, is the pair Hanski et al. (2013) use for birds and mammals. The capacity rises with the pooled area and falls when the same area is split into smaller and more distant fragments.

Theory predicts that fragmentation matters most when total habitat is already low, because the remaining area is then divided into pieces too small to sustain populations that need large territories or interior conditions away from edges. A single block of a given area then holds more species than the same area split into many fragments.

Atlas and citizen-science data confound area with effort: a large region that is sparsely surveyed can look species-poor because few of its species were detected. SESARS adds an effort term to the power law (Azovsky 2011; de la Sancha & Boyle 2019),

\[ \log(S) = c + z \log(A) + e \log(E), \]

where \(E\) is sampling effort and \(e\) is the effort exponent; \(A\), \(z\) and \(S\) keep their meanings and \(c\) is the intercept on the log scale. A positive \(e\) measures how much of the apparent richness gradient tracks survey intensity. With effort in the model, \(z\) estimates the area effect net of unequal sampling. model = "additive" fits \(S = c + z \log(A) + e \log(E)\) instead.

Both functions take every accumulation step of every seed as one observation, with the number of accumulated sites standing in for area (the plots show the mean over seeds against “Cumulative sites (area proxy)”). In sfar() the landscape at step \(k\) is the first \(k\) sites of the order: its fragments are the patches those sites lie in, the area of a fragment is the number of accumulated sites in it and its centroid is their mean position. A landscape of a single fragment has \(\lambda = 0\), because the matrix then has no off-diagonal element, and is left out of the fit. In sesars() the effort at step \(k\) is the summed effort of the first \(k\) sites of the order, so orders that reach the same number of sites through differently surveyed sites separate the two effects.

Practical guidance

  • SFAR needs at least 2 fragments, since a single fragment has no metapopulation capacity. Estimating \(b\) separately from \(z\) needs landscapes of similar area that differ in capacity, which fragments of unequal size and spacing provide. Set dispersal from data on the taxon (mark-recapture, telemetry or published dispersal kernels), and report b together with the distance used.

  • SESARS needs effort to span at least one order of magnitude (a 10-fold range from the least to the most surveyed site). When effort is nearly constant, \(\log(E)\) has no variance to fit and the effort exponent collapses towards zero with a wide standard error.

  • Endemism curves stabilise around 30 to 50 sites. Below 20 sites the early endemism proportion is dominated by the sampling order and the percentile band is too wide to read.

  • For grid thinning, set cell_size near the spatial scale of autocorrelation. A cell smaller than the nearest-neighbour spacing keeps nearly every site; a cell several times the spacing discards most of the data.

Method Minimum input Comfortable input
Endemism curve 20 sites 40 or more sites
SFAR 2 fragments fragments of unequal size and spacing
SESARS effort spanning 10x effort spanning 30x or more
Question Function
Which sites hold species found nowhere else? spaccEndemism()
How does diversity scale with area? dar()
Does fragmentation cost richness beyond area? sfar()
Is richness biased by uneven survey effort? sesars()
How do I reduce spatial redundancy before a fit? subsample()

Do not fit SFAR when patches are an arbitrary partition of continuous habitat, as the k-means patches here are. SFAR assumes fragments are real, isolated habitat units; on a continuous surface \(b\) carries no biological meaning. Do not use SESARS when effort is essentially uniform across sites: the model reduces to an ordinary species-area relationship with an extra parameter that cannot be identified, and the effort exponent is noise. Do not read endemism proportions from fewer than 20 sites, where the early steps are dominated by which site happened to be visited first.

References

  • Arrhenius, O. (1921). Species and area. Journal of Ecology, 9, 95-99.

  • Azovsky, A.I. (2011). Species-area and species-sampling effort relationships: disentangling the effects. Ecography, 34, 18-30. https://doi.org/10.1111/j.1600-0587.2010.06288.x

  • de la Sancha, N.U. & Boyle, S.A. (2019). Predictive sampling effort and species-area relationship models for estimating richness in fragmented landscapes. PLOS ONE, 14, e0226529. https://doi.org/10.1371/journal.pone.0226529

  • Dias, R.A., Bastazini, V.A.G., Gianuca, A.T. & Matthews, T.J. (2025). The spatial scaling of multiple dimensions of functional diversity in habitat islands. Functional Ecology. https://doi.org/10.1111/1365-2435.70158

  • Hanski, I., Zurita, G.A., Bellocq, M.I. & Rybicki, J. (2013). Species-fragmented area relationship. Proceedings of the National Academy of Sciences, 110, 12715-12720. https://doi.org/10.1073/pnas.1311491110

  • Kier, G., Kreft, H., Lee, T.M., et al. (2009). A global assessment of endemism and species richness across island and mainland regions. Proceedings of the National Academy of Sciences, 106, 9322-9327.

  • Ma, Z.S. (2018). DAR (diversity-area relationship): extending classic SAR for biodiversity and biogeography analyses. Ecology and Evolution, 8, 10023-10038.

  • Rybicki, J. & Hanski, I. (2013). Species-area relationships and extinctions caused by habitat loss and fragmentation. Ecology Letters, 16, 27-38.