locations: Plotting estimated locations

Description Usage Arguments Examples

Description

Plots estimated densities of animal locations, which are latent variables in SECR models.

Usage

1
2
3
4
5
6
7
locations(fit, id, infotypes = NULL, xlim = range(mask[, 1]),
  ylim = range(mask[, 2]), mask = get.mask(fit), levels = NULL,
  nlevels = 10, density = FALSE, cols = list(combined = "black", capt =
  "purple", bearing = "green", dist = "brown", toa = "blue"), lty = 1,
  show.labels = TRUE, plot.arrows = "bearing" %in% fit$infotypes,
  plot.circles = "dist" %in% fit$infotypes, arrow.length = NULL,
  show.legend = !add, show.axes = TRUE, add = FALSE)

Arguments

fit

A fitted model from admbsecr.

id

A numeric vector with row numbers from fit$args$capt, indicating which individuals' locations are to be plotted.

infotypes

A character vector indicating the type(s) of information to be used when plotting the estimated density of location. Elements can be a subset of "capt", "bearing", "dist", "ss", "toa", "combined", and "all", where "capt" shows estimated location only using detection locations, "combined" combines all information types together, and "all" plots all possible contour types. When signal strength information is used in the model fit, "capt" and "ss" are equivalent as the signal strength information is built into the detection function. By default, only the most informative contour is plotted, i.e., "capt" if the model was fitted with no additional information, and "combined" otherwise.

xlim

A numeric vector of length 2, giving the x coordinate range.

ylim

A numeric vector of length 2, giving the y coordinate range.

mask

A matrix with two columns. Each row provides Cartesian coordinates for the location of a mask point. The function create.mask will return a suitable object. The mask used to fit the model fit will be used by default; this argument is usually used when estimated location contours need to be plotted to a higher resolution than this.

levels

A numeric vector giving the values to be associated with the plotted contours.

nlevels

The number of contour levels desired. Ignored if levels is provided.

density

Logical, if TRUE, the labels on contours (and the levels specified by levels) refer to the density of the estimated distribution of the individual's location. If FALSE, the labels on contours (and the levels specified by levels) refer to the probability of the individual being located within the associated contour under the estimated distribution of the individual's location.

cols

A list with named components corresponding to each contour type (i.e., a subset of "capt", "bearing", "dist", "toa", and "combined"). Each component provides the colour of the associated contour type (e.g., using a character string such as "red", or a call to the function rgb). By default, if only one contour is to be plotted, it will be plotted in black.

lty

The line type of the contours; see par.

show.labels

Logical, if TRUE, contours are labelled with the appropriate probability density (if density is TRUE), or the corresponding probability of the individual being within the associated contour, under the estimated density (if density is FALSE).

plot.arrows

Logical, if TRUE, arrows indicating the estimated bearing to the individual are plotted from detectors at which detections were made.

plot.circles

Logical, if TRUE, circles indicating the estimated distance to the individual are plotted around detectors at which detections were made.

arrow.length

Numeric, providing the length of the arrows (only used if plot.arrows is TRUE).

show.legend

Logical, if TRUE, a legend will be added to the plot.

show.axes

Logical, if TRUE, axes will be added to the plot.

add

Logical, if TRUE, contours will be added to an existing plot.

Examples

1
2
3
4
5
6
7
locations(example$fits$simple.hn, 1)
locations(example$fits$simple.hn, 1, levels = c(0.50, 0.90, 0.95))
## Not run: 
fine.mask <- create.mask(example$traps, 20, spacing = 0.2)
locations(example$fits$bearing.hn, 1, infotypes = "all", mask = fine.mask)

## End(Not run)

admbsecr documentation built on May 2, 2019, 5:21 p.m.