Rsurface: Smoothed Resource Surface

RsurfaceR Documentation

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)

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

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.

Note

Consider a focal pixel s and another point in the habitat mask x, with distance d = |x - s|. Weights are given by a kernel f(d). Typically the kernel will be halfnormal f(d) = \exp(-d^2/(2\sigma^2)) (detectfn = ‘HHN’) or exponential f(d) = \exp(-d/\sigma) (detectfn = ‘HEX’) (see detectfn for other possibilities).

If z(x) represents the covariate value at point x, the summed resource availability at s is given by

R(s) = \sum_x f(d)\, \exp(\alpha_2 \, z(x)).

This corresponds to the denominator of eqn 4 in Royle et al. (2013).

By default, the numerical values reported by Rsurface are not raw R values. If scale = TRUE, values are standardized by dividing by the mean: R'(s) = R(s) / (\sum_s R(s) / n) where n is the number of pixels. Values of R'(s) are centred on 1.0.

If inverse = TRUE, the numeric values are 1 / R'(s) or 1 / R(s) as determined by scale.

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


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


secr documentation built on Oct. 18, 2023, 1:07 a.m.