
Adds an adaptability constraint to a scenario object
Source:R/add_constraint.R
add_constraint_adaptability.RdAdaptability constraints assume that suitable habitat for species in (future) projections might be unsuitable if it is outside the range of conditions currently observed for the species.
Usage
add_constraint_adaptability(
mod,
method = "nichelimit",
names = NULL,
approach = "thresh",
value = 1,
value_min = NULL,
value_max = NULL,
increment = 0,
...
)
# S4 method for class 'BiodiversityScenario'
add_constraint_adaptability(
mod,
method = "nichelimit",
names = NULL,
approach = "thresh",
value = 1,
value_min = NULL,
value_max = NULL,
increment = 0,
...
)Arguments
- mod
A
BiodiversityScenarioobject with specified predictors.- method
A
characterindicating the type of constraints to be added to the scenario. See details for more information.- names
A
charactervector with names of the predictors for which an adaptability threshold should be set (Default:NULLfor all).- approach
characteron whether thresholds or hinges are to be calculated (Default:'thresh'). For'fixedlimit'this controls how strongly the limits are enforced (e.g. abrupt or linearly).- value
A
numericvalue in units of standard deviation (Default:1) or alternatively as prefered value for"fixedlimit".- value_min
A
numericminimum value used for method"fixedlimit".- value_max
A
numericmaximum value used for method"fixedlimit".- increment
A
numericconstant that is added to value at every time step (Default:0). Allows incremental widening of the niche space, thus opening constraints.- ...
passed on parameters. See also the specific methods for adding constraints.
Details
Currently implemented are the following approaches:
* 'nichelimit' = This adds a simple constrain on the predictor parameter space,
which can be defined through the "value" parameter. For example by setting
it to 1 (Default), any projections are constrained to be within the
range of at maximum 1 standard deviation from the range of covariates used
for model training. The parameter "increment" furthermore allows to
step-wise increase the value range by a certain amount per time step.
* 'fixedlimit' = Here we can supply a fixed limit for a given variable, provided
as a minimum ("value_min"), maximum ("value_max") and preferred ("value")
range in which a biodiversity feature exist. Common applications include for example
known thermal limits with regards to temperature. Internally this function applies
a normalized hinge transform based on the supplied values.
See also
Other constraint:
add_constraint(),
add_constraint_MigClim(),
add_constraint_boundary(),
add_constraint_connectivity(),
add_constraint_dispersal(),
add_constraint_minsize(),
add_constraint_threshold(),
simulate_population_steps()
Examples
if (FALSE) { # \dontrun{
scenario(fit) |>
add_constraint_adaptability(value = 1)
} # }