
# S3 method for secr
plot(x, newdata = NULL, add = FALSE,
sigmatick = FALSE, rgr = FALSE, limits = FALSE, alpha = 0.05,
xval = 0:200, ylim = NULL, xlab = NULL, ylab = NULL, ...)# S3 method for secrlist
plot(x, newdata = NULL, add = FALSE,
sigmatick = FALSE, rgr = FALSE, limits = FALSE, alpha = 0.05,
xval = 0:200, ylim = NULL, xlab = NULL, ylab = NULL, ...,
overlay = TRUE)
detectfnplot (detectfn, pars, details = NULL, add = FALSE,
sigmatick = FALSE, rgr = FALSE, xval = 0:200, ylim = NULL,
xlab = NULL, ylab = NULL, ...)
attenuationplot (pars, add = FALSE, spherical = TRUE,
xval = 0:200, ylim = NULL, xlab = NULL, ylab = NULL, ...)
secr
object lines
add = TRUE
for plots after the first plot.secr
invisibly returns a dataframe of the plotted values (or
a list of dataframes in the case that newdata
has more than one
row).
newdata
is usually NULL, in which case one curve is plotted for
each session and group. Otherwise, predict.secr
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'.
detectfnplot
is an alternative in which the user nominates the
type of function and provides parameter values. pars
maybe a list
as from detectpar
; it is first coerced to a numeric vector
with unlist
. Parameter values must be in the expected order
(e.g. g0, sigma, z). If pars
is a matrix then a separate
curve is plotted with the parameter values in each row.
For detectfnplot
the signal threshold parameters `cutval' and
`spherical' should be provided in details
(see examples).
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 is assumed to be normal on the logit scale;
limits are back-transformed from that scale.
attenuationplot
plots the expected decline in signal strength
with distance, given parameters
Detection functions
, plot
, secr
plot (secrdemo.b, xval = 0:100, ylim = c(0, 0.4))
## Add recapture probability
plot (secrdemo.b, newdata = data.frame(b = 1), add = TRUE,
col = "red")
## signal strength detection: 70dB at source, attenuation
## 0.3dB/m, sdS 5dB; detection threshold 40 dB.
detectfnplot (detectfn = 10, c(70, -0.3, 5), details =
list(cutval = 40))
## add a function with louder source and spherical spreading...
detectfnplot (detectfn = 11, c(110, -0.3, 5), details =
list(cutval = 40), add = TRUE, col = "red")
## matching sound attenuation curves; `spherical-only' dashed line
attenuationplot (c(70, -0.3), spherical = FALSE, ylim=c(-10,110))
attenuationplot (c(110, 0), spherical = TRUE, add=TRUE, lty=2)
attenuationplot (c(110, -0.3), spherical = TRUE, add = TRUE,
col = "red")
Run the code above in your browser using DataLab