Plot detection functions using estimates of parameters in an ipsecr object.
# S3 method for 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, ...)
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).
an ipsecr object
dataframe of data to form estimates
logical to add curve(s) to an existing plot
logical; if TRUE the scale parameter sigma is shown by a vertical line
logical; if TRUE a scaled curve r.g(r) is plotted instead of g(r)
logical; if TRUE pointwise confidence limits are drawn
alpha level for confidence intervals
vector of distances at for which detection to be plotted
vector length 2 giving limits of y axis
label for x axis
label for y axis
arguments to pass to lines
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).
Detection functions, plot, ipsecr, detectfnplot
plot (ipsecrdemo, xval = 0:100, ylim = c(0, 0.4))
Run the code above in your browser using DataLab