Fit climniche to raster data
Usage
fit_climniche_raster(
current,
future,
occupied = NULL,
occupied_threshold = NULL,
domain = NULL,
domain_threshold = 0,
cnfa = NULL,
center = NULL,
sensitivity = NULL,
A = NULL,
metric = c("diag", "factor"),
boundary = 0.95,
scale = TRUE,
preprocess = TRUE,
preprocess_correlation = 0.95,
preprocess_min_sd = 1e-08,
global_mean = NULL,
global_sd = NULL,
tolerance = NULL,
tolerance_quantile = 0.1,
boundary_exceedance_tolerance = 0
)Arguments
- current
Raster* object of current climate layers.
- future
Raster* object of future climate layers with the same geometry and layer order as
current.- occupied
Optional RasterLayer with binary or continuous occurrence, range, or SDM suitability values.
- occupied_threshold
Values at or below this threshold receive zero reference weight. Values above it keep their original value.
- domain
Optional RasterLayer limiting cells where exposure is analysed.
- domain_threshold
Values greater than this threshold define the domain.
- cnfa
Optional CENFA
cnfaobject. Its marginality and sensitivity slots are used whencenter,sensitivity, orAare not supplied.- center
Optional realised niche centre in the climate space used by the fit. If omitted, the centre is the weighted mean of current reference rows.
- sensitivity
Optional non-negative variable weights. Used to build a diagonal metric when
Ais not supplied.- A
Optional square metric matrix. When supplied, it overrides
sensitivity,cnfa, andmetricfor distance calculations.- metric
Method used to build
AwhenAis missing."diag"uses variable-level sensitivity weights."factor"uses the factor metric available from a compatible CENFA object.- boundary
Quantile used to define the empirical boundary of the current realised niche. Must be between 0 and 1.
- scale
Logical. If
TRUE, current and future values are centred and scaled with the current-layer mean and standard deviation before distances are calculated.- preprocess
Logical. If
TRUE, remove near-zero variance variables and highly correlated variables before metric fitting.- preprocess_correlation
Maximum absolute pairwise correlation retained among current climate variables during preprocessing.
- preprocess_min_sd
Minimum current-climate standard deviation retained during preprocessing.
- global_mean
Optional means used for centering. If omitted, column means of
currentare used.- global_sd
Optional standard deviations used for scaling. If omitted, column standard deviations of
currentare used.- tolerance
Optional tolerance around zero for Niche Distance Shift. If
NULL, the fitted object usestolerance_quantile.- tolerance_quantile
Quantile of absolute Niche Distance Shift used to set
tolerancewhentolerance = NULL.- boundary_exceedance_tolerance
Tolerance used to label whether Niche Boundary Exceedance is greater than zero for descriptor summaries.