
Creates a smoothed resource surface from a covariate of a mask. Smoothing entails summing the value in each pixel weighted by a detection kernel centred on the focal pixel. The detection kernel represents home-range utilization with spatial scale sigma. The resulting surface is equivalent to the denominator used by Royle et al. (2013) to normalize site-specific detection.
Rsurface(mask, sigma, usecov = NULL, alpha2 = 1, detectfn = 'HHN', z = 1,
inverse = FALSE, scale = TRUE)
An object with class c(`Rsurface', `mask', `data.frame') and covariate `Resource'
(other covariates are retained from the input mask). The attribute
`scale' is 1.0 if scale = FALSE
; otherwise it is the average of the
resource over the masked area.
secr habitat mask object (single-session)
numeric spatial scale of home range model
numeric coefficient of spatial covariate
character name of resource covariate
integer or character code for detection function
numeric shape parameter of home range model
logical; if TRUE the reciprocal of smoothed resource is returned
logical; not used
detectfn
may be uniform (‘UN’) or one of the
cumulative-hazard functions (‘HHN’, ‘HHR’, ‘HEX’,
‘HAN’, ‘HCG’) (or integer codes 4, 14:18; see
detectfn).
The default ‘HHN’ corresponds to a halfnormal function on the hazard scale, or a bivariate circular normal home range.
If usecov
is not named then it takes the value 1.0 for all points
on the mask and zero otherwise.
The Rsurface can be used implicitly to normalize detection probability when
fitting a model with detector-specific covariate equal to
usecov
(see details, but the process is intricate and not
fully documented).
Royle, J. A., Chandler, R. B., Sun, C. C. and Fuller, A. K. (2013) Integrating resource selection information with spatial capture--recapture. Methods in Ecology and Evolution 4, 520--530.
mask
, plot.Rsurface
,
spotHeight
, details
## create binary covariate (0 outside habitat)
msk <- make.mask(traps(possumCH), buffer = 800)
covariates(msk) <- data.frame(z = as.numeric(pointsInPolygon
(msk,possumarea)))
## derive and plot "resource availability"
Rs <- Rsurface(msk, sigma = 100, usecov = 'z')
plot(Rs, plottype = 'contour', col = topo.colors(10))
lines(possumarea)
if (interactive()) {
spotHeight(Rs, dec = 2)
}
Run the code above in your browser using DataLab