| plot.ipsecr {ipsecr} | R Documentation |
Plot Detection Functions
Description
Plot detection functions using estimates of parameters in an ipsecr object.
Usage
## S3 method for class 'ipsecr'
plot(x, newdata = NULL, add = FALSE,
sigmatick = FALSE, rgr = FALSE, limits = FALSE, alpha = 0.05,
xval = 0:200, ylim = NULL, xlab = NULL, ylab = NULL, ...)
Arguments
x |
an |
newdata |
dataframe of data to form estimates |
add |
logical to add curve(s) to an existing plot |
sigmatick |
logical; if TRUE the scale parameter sigma is shown by a vertical line |
rgr |
logical; if TRUE a scaled curve r.g(r) is plotted instead of g(r) |
limits |
logical; if TRUE pointwise confidence limits are drawn |
alpha |
alpha level for confidence intervals |
xval |
vector of distances at for which detection to be plotted |
ylim |
vector length 2 giving limits of y axis |
xlab |
label for x axis |
ylab |
label for y axis |
... |
arguments to pass to |
Details
newdata is usually NULL, in which case one curve is plotted for
each session and group. Otherwise, predict.ipsecr is used to form
estimates and plot a curve for each row in newdata.
If axis labels are not provided they default to ‘Distance (m)’ and ‘Detection probability’ or ‘Detection lambda’.
Approximate confidence limits for g(r) are calculated using a numerical
first-order delta-method approximation to the standard error at each
xval. The distribution of g(r) is assumed to be normal on the logit scale for non-hazard functions (detectfn 0:13). For hazard detection functions (detectfn 14:18) the hazard is assumed (from version 3.1.1) to be distributed normally on the log scale. Limits are back-transformed to the probability scale g(r).
Value
plot.ipsecr invisibly returns a dataframe of the plotted values (or
a list of dataframes in the case that newdata has more than one
row).
See Also
Detection functions, plot, ipsecr, detectfnplot
Examples
plot (ipsecrdemo, xval = 0:100, ylim = c(0, 0.4))