Skip to contents

Adaptability 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 BiodiversityScenario object with specified predictors.

method

A character indicating the type of constraints to be added to the scenario. See details for more information.

names

A character vector with names of the predictors for which an adaptability threshold should be set (Default: NULL for all).

approach

character on 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 numeric value in units of standard deviation (Default: 1) or alternatively as prefered value for "fixedlimit".

value_min

A numeric minimum value used for method "fixedlimit".

value_max

A numeric maximum value used for method "fixedlimit".

increment

A numeric constant 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.

Examples

if (FALSE) { # \dontrun{
scenario(fit) |>
 add_constraint_adaptability(value = 1)
} # }