detection.prob: Calculate detection probabilities.

Description Usage Arguments Value References Examples

Description

Calculates the detection probability at one or more distances.

Usage

1
2
detection.prob(d, detection.function = c("halfnormal", "hazard"), theta,
  deriv, stop = F)

Arguments

d

The distance or distances of interest.

detection.function

The detection function. Only "halfnormal" and "hazard" (hazard rate) are supported at present.

theta

The detection function parameters. A single value for halfnormal, or a vector of two values for hazard rate.

deriv

Optional numeric value specifying whether a derivative is required. If missing, the function returns the detection probabilities at distances d. If deriv is equal to 1 or 2, the derivatives of the detection function with respect to theta[deriv] at d are returned. Note that the halfnormal detection function has only one parameter, so setting deriv=2 and detection.function="halfnormal" will result in an error.

stop

Set to T to open a browser window (for debugging purposes)

Value

A vector of detection probabilities corresponding to the distances in d.

References

Buckland S, Anderson D, Burnham K, Laake J and Borchers D (2001). Introduction to Distance Sampling: Estimating Abundance of Biological Populations. Oxford: Oxford University Press.

Clark, R. G. (2016), "Statistical efficiency in distance sampling," PLoS One, forthcoming, www.plosone.org

Examples

1
2
3
dvalues <- seq(from=0,to=1,by=0.001)
dprobs <- detection.prob(d=dvalues,detection.function="hazard",theta=c(0.448,2))
plot(dvalues,dprobs,type="l",ylim=c(0,1))

Example output



distance.sample.size documentation built on May 1, 2019, 10:27 p.m.