How large must the calibration area be? Rotllan-Puig & Traveset (2021)
grew the background in steps from the centre of the records and found
the smallest area beyond which models stopped improving (their MinBAR
method). preENM fits no model, so m_minimal() keeps the geometry of
their procedure and asks a model-free question instead: from which
extent on does the environment available stop changing as the area
grows?
Arguments
- points
Records: a data.frame with coordinates, a CSV path,
sfor terra::SpatVector.- env
Predictor layers covering a generous region around the records.
- steps
Number of extents up to the farthest record.
- beyond
Multiples of the farthest record's distance added as further extents.
- centre
"median"or"mean"of the record coordinates.- n
Random points per extent.
- k_stable
Consecutive stable steps required.
- coords, points_crs
Coordinate columns and their CRS.
- seed
Random seed.
Value
An object of class m_minimal: extents (one row per extent:
radius_km, area_km2, records_pct, n_points, ks_step,
ks_largest, stable), minimal (the row of the first stable
extent, or NULL), m (that circle as an sfc polygon in WGS84),
centre and settings.
Details
Extents. Circles around the centre of the records (their median coordinates, or the mean), whose radii contain growing shares of the records (
stepsequal steps of records, as in MinBAR, so that scattered records do not leave large empty steps), then larger circles beyond the farthest record (beyond, multiples of its distance).Environment of each extent.
nrandom points within the circle, with values in every layer.Change. The largest Kolmogorov-Smirnov distance, over the layers, between the environment of an extent and of the previous one (
ks_step), and between each extent and the largest (ks_largest). The environment has stabilised whenks_stepis below the 5% critical value of the two-sample test (1.36 * sqrt(2 / n), about 0.019 forn = 10000; consecutive extents cannot be told apart) fork_stableconsecutive steps.
The stable extent is a lower bound for a calibration area that
represents the conditions around the records; it is not a delimitation
of M by dispersal (see delimit_m() and m_simulate()). The extent of
the calibration area strongly affects model accuracy (Luna et al. 2024),
so compare it with the other delimitations in m_scenarios().
References
Rotllan-Puig, X., Traveset, A. (2021) Determining the minimal background area for species distribution models: MinBAR package. Ecological Modelling 439, 109353. doi:10.1016/j.ecolmodel.2020.109353
Luna, S., Pena-Peniche, A., Mendoza-Alfaro, R. (2024) Species distribution model accuracy is strongly influenced by the choice of calibration area. Biodiversity Informatics 18, 43-55. doi:10.17161/bi.v18i.22655
Examples
# \donttest{
sim <- simulate_enm_data(seed = 1, n_presence = 60)
mm <- m_minimal(sim$presence, sim$env, steps = 6, n = 3000, seed = 1)
mm
#> Minimal background area: 9 extents around the median centre of the records, up to 775 km
#>
#> IN SHORT
#> - The environment did not stabilise within the extents tested: each larger
#> circle still adds conditions that differ from the smaller one. Test
#> larger extents (`beyond`), or accept that the environment around the
#> records keeps changing (e.g. a continental gradient), and choose M on
#> other grounds (dispersal, m_simulate()).
#> - This concerns the environment only, not model performance (MinBAR used
#> models). The extent of the calibration area strongly affects model
#> accuracy (Luna et al. 2024): compare it with other delimitations in
#> m_scenarios().
#>
#> step radius_km area_km2 records_pct n_points ks_step critical ks_largest
#> 1 113 39840 16.7 3000 NA NA 0.349
#> 2 179 100709 33.3 3000 0.157 0.035 0.259
#> 3 197 122296 50.0 3000 0.034 0.035 0.240
#> 4 222 154741 66.7 3000 0.054 0.035 0.214
#> 5 274 235795 83.3 3000 0.073 0.035 0.152
#> 6 387 471192 100.0 3000 0.107 0.035 0.060
#> 7 484 736237 100.0 3000 0.038 0.035 0.025
#> 8 581 1060181 100.0 2579 0.032 0.037 0.047
#> 9 775 1884767 100.0 1452 0.047 0.045 0.000
#> stable
#> FALSE
#> FALSE
#> FALSE
#> FALSE
#> FALSE
#> FALSE
#> FALSE
#> FALSE
#> FALSE
#>
#> ks_step = largest Kolmogorov-Smirnov distance, over the layers, between the
#> environment of an extent and the previous one; critical = its 5% critical
#> value; ks_largest = the same against the largest extent. Stable = ks_step
#> below the critical value for 2 consecutive steps; the minimal extent is the
#> one before the first stable step.
#>
#> A preENM sensitivity analysis: how much the result depends on the extent of
#> M. The others are listed in ?sensitivity_analyses.
plot(mm)
# }
