This function summarizes effort to dual mesh.
Arguments
- dmesh
A dual mesh sf object
- obs
A sf spatial data.frame with observations of the target species
- background
A sf data.frame with observations of the target group or a terra raster with the sum of observations of the target group for each pixel.
- adjust
Whether to adjust effort to be species-specific. Default to
FALSE
. Ifadjust = TRUE
, a column named \"species\" with species name must be present in thebackground data.frame
. Currently ignored for when a species column is not given inbackground
or when it is a raster.- buffer
A sf polygon to be used as a buffer around locations to prevent extrapolation outside of the species range. Dual mesh cells without any effort outside of this buffer will be assigned an effort value to force model predictions toward 0.
- nsimeff
Effort value to assign to cells outside of the buffer. An
integer
representing a number of background observations.- ...
Arguments passed to
inla
Value
A list with element effort with a data.frame
summarizing the number of observations and the various effort measures for each cell of the dual mesh.
Depending on the options chosen, the data.frame
will contain some or all of the following:
nobs
: number of observationsnbackground
: number of background observations from the target groupnpres
: whether the species is present in a cell or not (1 = present, 0 = absent)nsp
: number of species in a cellnbackgroundwithbuff
: nbackground to which fictious observations have been added using the effort buffernbackgroundspadjusted
: nbackground with species-specific adjustmentnbackgroundspadjustedwithbuff
: nbackground with species-specific adjustment and to which fictious observations have been added using the effort buffer
Details
Either an sf
spatial object with points or a raster can be used. If a raster, empty cells will be filled with 0.
References
Simpson, D. Illian, J. B., Lindgren, F. Sørbye, S. H. and Rue, H. 2016. Going off grid: computationally efficient inference for log-Gaussian Cox processes. Biometrika, 103(1): 49-70 https://doi.org/10.1093/biomet/asv064