pkernel: Kernel Distribution Functions

pkernelR Documentation

Kernel Distribution Functions

Description

Distribution of distance moved for each of the main movement kernels. Theoretical probability density, cumulative distribution function, and quantile function (inverse of the cumulative distribution function).

Usage


pkernel(q, movementmodel = c("BVN", "BVE", "BVC", "BVT", "RDE", "RDG", "RDL"), 
    move.a, move.b, truncate = Inf, lower.tail = TRUE)

dkernel(r, movementmodel = c("BVN", "BVE", "BVC", "BVT", "RDE", "RDG", "RDL"), 
    move.a, move.b, truncate = Inf)

qkernel(p, movementmodel = c("BVN", "BVE", "BVC", "BVT", "RDE", "RDG", "RDL"), 
    move.a, move.b, truncate = Inf, lower.tail = TRUE)

gkernel(r, movementmodel = c("BVN", "BVE", "BVC", "BVT", "RDE", "RDG", "RDL"),
    move.a, move.b, truncate = Inf)
    

Arguments

p

numeric vector of cumulative probabilities (0.5 for median)

r

numeric vector of distance moved

q

numeric vector of quantiles (distance moved)

movementmodel

character (see Movement models and openCR-vignette.pdf)

move.a

numeric parameter of movement kernel

move.b

numeric parameter of movement kernel

truncate

numeric q value at which distribution truncated

lower.tail

logical; if TRUE (default), probabilities are P[X <= x] otherwise, P[X > x].

Details

Some formulae are given in openCR-vignette.pdf. gkernel gives the 2-D probability density of the bivariate kernel g(r) = f(r) / (2π r); the remaining functions describe the distribution of distance moved f(r).

Computation of qkernel for movementmodel = 'BVE' uses numerical root finding (function uniroot).

Truncation (truncate = limit for finite limit) adjusts probabilities upwards by 1/pkernel(limit,..., truncate = Inf) so that pkernel(limit, ..., truncate = limit) equals 1.0. By default the distribution is not truncated.

Value

For pkernel

Vector of cumulative probabilities corresponding to q. The cumulative probability is 1.0 for q > truncate.

For dkernel

Vector of probability density at radial distance r (zero for r > truncate).

For qkernel

Vector of quantiles (distances moved) corresponding to cumulative probabilities p.

For gkernel

Vector of 2-D probability density at radial distance r (zero for r > truncate).

References

Efford, M. G. and Schofield, M. R. (2022) A review of movement models in open population capture–recapture. Methods in Ecology and Evolution. In press. https://doi.org/10.1111/2041-210X.13947

See Also

Movement models, make.kernel, matchscale

Examples

# plot 3 distributions chosen with matchscale to intersect at p = 0.5
q <- 0:100
plot(q, pkernel(q, 'BVN', 34), type = 'l', ylab = 'Cumulative probability')
lines(q, pkernel(q, 'BVT', move.a = 104, move.b = 5), col = 'darkgreen', lwd = 2)
lines(q, pkernel(q, 'BVT', move.a = 40, move.b = 1), col = 'orange', lwd = 2)
points(40, 0.5, pch = 16)
legend(62, 0.36, lty=1, lwd = 2, col = c('black','darkgreen','orange'), 
   legend = c('BVN sigma=34', 'BVT a=104, b=5', 'BVT a=40, b=1'))

# median
abline(v = qkernel(0.5, 'BVN', 34))

openCR documentation built on Sept. 25, 2022, 5:06 p.m.