Learn R Programming

ctmm (version 0.2.8)

akde: Calculate an autocorrelated kernel density estimate

Description

This function calculates autocorrelated kernel density estimates of different confidence levels from telemetry data and a continuous-time movement model.

Usage

akde(data,CTMM,alpha=0.05,fast=NULL,dt=NULL,error=0.005)

Arguments

data
2D timeseries telemetry data represented as a telemetry object or data.frame or list with components t, x, y all numeric values.
CTMM
A ctmm movement model from the output of ctmm.fit.
alpha
Significance level for when propagating uncertainties in the ctmm parameter estimates.
fast, dt
Arguments passed to all instances of akde.bandwidth.
error
Target error for discretization.

Value

  • Returns an akde object: a list with component kernel-density objects low, ML, high, and the corresponding significance level alpha for the optimal bandwidth area. Each kernel-density object contains the sampled grid line locations x and y, the probability density function evaluated on the sampled grid locations pdf, the optimal bandwidth matrix H, and the area of each grid cell dA.

Details

The grid size and resolution is chosen to prevent probability errors larger than error on a worst case basis. The grid size is chosen such that locations nearest the boundary will have at least error portion of their kernel's probability within an ellipse contained by the grid. For this the grid boundary is chosen to be at least a number of bandwidth standard deviations, $z$, from all sampled locations according to the 2D Gaussian quantile relation $z^2 = -2 \log$ error. The choice of grid cell size is such that no single pixel contains a significant amount of probability by constraining the discretized probability density according to $2 \sum_{i=1}^\infty \frac{\exp{-\frac{dz^2}{2}}}{\sqrt{2\pi}} = 1 -$ error. Limiting behavior of the Jacobi theta function then gives a suggested grid resolution of $dz =$ error $/ 0.398942\cdots$ bandwidth standard deviations.

References

C. H. Fleming and W. F. Fagan and T. Mueller and K. A. Olson and P. Leimgruber and J. M. Calabrese (2015). Rigorous home-range estimation with movement data: A new autocorrelated kernel-density estimator. http://www.esajournals.org/doi/abs/10.1890/14-2010.1{Ecology, 96(5), 1182-1188}.

See Also

akde.bandwidth, raster.akde

Examples

Run this code
# Load package and data
library(ctmm)
data(buffalo)
cilla <- buffalo[[1]]

# Fit a continuous-velocity model with tau ~ c(10 days, 1 hour)
# see help(variogram.fit)
m2 <- ctmm(tau=c(10*24*60^2,60^2))
M2 <- ctmm.fit(cilla,m2)

# Compute akde object
KD2 <- akde(cilla,M2)

# Plot data with AKDE contours
plot(cilla,AKDE=KD2)

Run the code above in your browser using DataLab