show.detfn: Plotting a detection function.

Description Usage Arguments Examples

Description

Plots an estimated detection function from a model fit generated by admbsecr.

Usage

1
2
show.detfn(fit, xlim = NULL, ylim = c(0, 1), main = NULL,
  xlab = "Distance (m)", ylab = "Detection probability", add = FALSE, ...)

Arguments

fit

A fitted model from admbsecr.

xlim

A vector with two elements, giving the x-axis limits. If NULL, this is set to the buffer of the mask.

ylim

A vector with two elements, giving the y-axis limits.

main

The main title (on top) using font, size (character expansion) and color par(c("font.main", "cex.main", "col.main")).

xlab

X axis label using font, size and color par(c("font.lab", "cex.lab", "col.lab")).

ylab

Y axis label, same font attributes as xlab.

add

Logical, if TRUE, the estimated detection function is added to an existing plot.

...

Further arguments to be passed to lines.

Examples

1
2
3
4
## Comparison of two detection functions fitted to the same data
show.detfn(example$fits$simple.hn, main = "Detection function comparison")
show.detfn(example$fits$simple.hr, add = TRUE, col = "blue")
legend("topright", legend = c("Half normal", "Hazard rate"), lty = 1, col = c("black", "blue"), bg = "white")

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