Learn R Programming

secr (version 4.6.10)

Rsurface: Smoothed Resource Surface

Description

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.

Usage

Rsurface(mask, sigma, usecov = NULL, alpha2 = 1, detectfn = 'HHN', z = 1,
 inverse = FALSE, scale = TRUE)

Value

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.

Arguments

mask

secr habitat mask object (single-session)

sigma

numeric spatial scale of home range model

alpha2

numeric coefficient of spatial covariate

usecov

character name of resource covariate

detectfn

integer or character code for detection function

z

numeric shape parameter of home range model

inverse

logical; if TRUE the reciprocal of smoothed resource is returned

scale

logical; not used

Details

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).

References

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.

See Also

mask, plot.Rsurface, spotHeight, details

Examples

Run this code

## 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