Learn R Programming

secr (version 2.5.0)

circular: Circular Probability

Description

Functions to answer the question "what radius is expected to include proportion p of points from a circular bivariate distribution corresponding to a given detection function", and the reverse. These functions may be used to relate the scale parameter(s) of a detection function (e.g., $\sigma$) to home-range area (specifically, the area within an activity contour for the corresponding simple home-range model) (see Note).

Usage

circular.r (p = 0.95, detectfn = 0, sigma = 1, detectpar = NULL) 

circular.p (r = 1, detectfn = 0, sigma = 1, detectpar = NULL)

Arguments

p
vector of probability levels for which radius is required
r
vector of radii for which probability level is required
detectfn
integer code or character string for shape of detection function 0 = halfnormal, 1 = hazard rate etc. -- see detectfn
sigma
spatial scale parameter of detection function
detectpar
named list of detection function parameters

Value

  • Vector of values for the required radii or probabilities.

Details

circular.r is the quantile function of the specified circular bivariate distribution (analogous to qnorm, for example). The quantity calculated by circular.r is sometimes called `circular error probable' (see Note). For detection functions with two parameters (intercept and scale) it is enough to provide sigma. Otherwise, detectpar should be a named list including parameter values for the requested detection function (g0 may be omitted, and order does not matter).

References

Calhoun, J. B. and Casby, J. U. (1958) Calculation of home range and density of small mammals. Public Health Monograph No. 55. United States Government Printing Office. Johnson, R. A. and Wichern, D. W. (1982) Applied multivariate statistical analysis. Prentice-Hall, Englewood Cliffs, New Jersey, USA.

See Also

detectfn, detectfnplot

Examples

Run this code
## Calhoun and Casby (1958) p 3.
## give p = 0.3940, 0.8645, 0.9888
circular.p(1:3)

## halfnormal, hazard-rate and exponential
circular.r ()
circular.r (detectfn = 1, detectpar = list(sigma = 1, z = 4))
circular.r (detectfn = 2)

plot(seq(0, 5, 0.01), circular.p(r = seq(0, 5, 0.01)),
    type = "l", xlab = "Radius (multiples of sigma)", ylab = "Probability")
lines(seq(0, 5, 0.01), circular.p(r = seq(0, 5, 0.01), detectfn = 2),
    type = "l", col = "red")
lines(seq(0, 5, 0.01), circular.p(r = seq(0, 5, 0.01), detectfn = 1,
    detectpar = list(sigma = 1,z = 4)), type = "l", col = "blue")
abline (h = 0.95, lty = 2)

legend (2.8, 0.3, legend = c("halfnormal","hazard-rate, z = 4", "exponential"),
    col = c("black","blue","red"), lty = rep(1,3))

## in this example, a more interesting comparison would use
## sigma = 0.58 for the exponential curve.

Run the code above in your browser using DataLab