Specify elevational preferences as offsetSource:
This function implements the elevation preferences offset defined in Ellis‐Soto et al. (2021). The code here was adapted from the Supporting materials script.
add_offset_elevation(x, elev, pref, rate = 0.0089, add = TRUE) # S4 method for BiodiversityDistribution,SpatRaster,numeric,numeric,logical add_offset_elevation(x,elev,pref,rate,add)
SpatRasterwith the elevation for a given background.
numericvector of length
2giving the lower and upper bound of known elevational preferences. Can be set to
numericfor the rate used in the offset (Default:
.0089). This parameter specifies the decay to near zero probability at elevation above and below the expert limits.
logicalspecifying whether new offset is to be added. Setting this parameter to
FALSEreplaces the current offsets with the new one (Default:
Adds a elevational offset to a
Specifically this functions calculates a continuous decay and
decreasing probability of a species to occur from elevation limits. It
SpatRaster with elevation information. A generalized logistic
transform (aka Richard's curve) is used to calculate decay from the suitable
elevational areas, with the
"rate" parameter allowing to vary the
steepness of decline.
Note that all offsets created by this function are by default log-transformed before export. In addition this function also mean-centers the output as recommended by Ellis-Soto et al.
Ellis‐Soto, D., Merow, C., Amatulli, G., Parra, J.L., Jetz, W., 2021. Continental‐scale 1 km hummingbird diversity derived from fusing point records with lateral and elevational expert information. Ecography (Cop.). 44, 640–652. https://doi.org/10.1111/ecog.05119
Merow, C., Allen, J.M., Aiello-Lammens, M., Silander, J.A., 2016. Improving niche and range estimates with Maxent and point process models by integrating spatially explicit information. Glob. Ecol. Biogeogr. 25, 1022–1036. https://doi.org/10.1111/geb.12453