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
 8
 9
10
11
locations(fit, id, infotypes = NULL, combine = FALSE, xlim = range(mask[,
  1]), ylim = range(mask[, 2]), mask = get.mask(fit), levels = NULL,
  nlevels = 10, density = FALSE, cols = list(combined = "black", capt =
  "purple", ss = "orange", bearing = "green", dist = "brown", toa = "blue"),
  ltys = list(combined = "solid", capt = "solid", ss = "solid", bearing =
  "solid", dist = "solid", toa = "solid"), trap.col = "red",
  circle.traps = TRUE, show.labels = TRUE, plot.contours = TRUE,
  plot.estlocs = FALSE, keep.estlocs = FALSE, plot.arrows = "bearing"
  %in% fit$infotypes, plot.circles = "dist" %in% fit$infotypes,
  arrow.length = NULL, show.legend = FALSE, 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.

combine

Logical, if TRUE then the information types specified in infotypes are combined into a single contour. If FALSE then separate contours are plotted for each information type.

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. Alternatively, a vector with a single element, specifying the colour for all contours.

ltys

The line type of the contours, with the same required syntax as cols; see par.

trap.col

The colour of the points representing detector locations.

circle.traps

Logical, if TRUE circles are plotted around traps that made a detection of the individual in question.

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

Logical, if TRUE, contours are plotted. Note that, if FALSE, nothing corresponding to the density of the individuals' locations is plotted unless plot.estlocs is TRUE.

plot.estlocs

Logical, if TRUE, dots are plotted at the mode of the combined densities. If a density has more than a single mode (and the modes have the same density value) then a dot will be plotted for each.

keep.estlocs

Logical, if TRUE, the locations of the estimated locations are returned.

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)

b-steve/admbsecr documentation built on May 11, 2019, 5:20 p.m.