make.mask {secr}R Documentation

Build Habitat Mask

Description

Construct a habitat mask object for spatially explicit capture-recapture. A mask object is a set of points with optional attributes.

Usage

make.mask(traps, buffer = 100, spacing = NULL, nx = 64, 
    type = "traprect", poly = NULL, pdotmin = 0.001, ...)

Arguments

traps object of class traps
buffer width of buffer in metres
spacing spacing between grid points (metres)
nx number of grid points in 'x' direction
type character string for method to use ('traprect', 'trapbuffer', 'pdot', 'polygon')
poly matrix of two columns interpreted as the x and y coordinates of a bounding polygon (optional)
pdotmin minimum detection probability for inclusion in mask when type = 'pdot' (optional)
... additional arguments passed to pdot when type = 'pdot'

Details

The 'traprect' method constructs a grid of points in the rectangle formed by adding a buffer strip to the minimum and maximum x-y coordinates of the detectors in traps. Both 'trapbuffer' and 'pdot' start with a 'traprect' mask and drop some points.

The 'trapbuffer' method restricts the grid to points within distance buffer of any detector.

The 'pdot' method restricts the grid to points for which the net detection probability p.(X) (see pdot) is at least pdotmin. Additional parameters are used by pdot (detectpar, noccasions). Set these with the ... argument; otherwise make.mask will silently use the arbitrary defaults.

The 'polygon' method places points on a rectangular grid clipped to the polygon (buffer is not used).

If spacing is not specified then it is determined by dividing the range of the x coordinates (including any buffer) by nx.

Value

an object of class mask

Note

A warning is displayed if type = 'pdot' and the buffer is too small to include all points with p. > pdotmin.

A habitat mask is needed to fit an SECR model and for some related computations. The default mask settings in secr.fit may be good enough, but it is preferable to use make.mask to construct a mask in advance and to pass that mask as an argument to secr.fit.

Author(s)

Murray Efford murray.efford@otago.ac.nz

See Also

mask, subset.mask, pdot

Examples


temptrap <- make.grid(nx = 10, ny = 10, spacing = 30)

## default method: traprect
tempmask <- make.mask(temptrap, spacing = 5)
plot(tempmask)
summary (tempmask)

## make irregular detector array by subsampling 
## form mask by 'trapbuffer' method
temptrap <- subset (temptrap, sample(nrow(temptrap), size = 30))
tempmask <- make.mask (temptrap, spacing = 5, type = 'trapbuffer')
plot (tempmask)
plot (temptrap, add = TRUE)

## form mask by 'pdot' method
temptrap <- make.grid(nx = 6, ny = 6)
tempmask <- make.mask (temptrap, buffer = 150, type = 'pdot', 
    pdotmin = 0.0001, detectpar = list(g0 = 0.1, sigma = 30),
    noccasions = 4)
plot (tempmask)
plot (temptrap, add = TRUE)


[Package secr version 1.2.11 Index]