akde.bandwidth:
Calculate the optimal bandwidth matrix of movement data
Description
This function calculates the optimal bandwidth matrix (kernel covariance) for a two-dimensional animal tracking dataset, given an autocorrelated movement model (Fleming et al, 2015). This optimal bandwidth can fully take into account all autocorrelation in the data, assuming it is captured by the movement model.
Usage
akde.bandwidth(data,CTMM,VMM=NULL,fast=NULL,dt=NULL,verbose=FALSE)
Arguments
data
2D timeseries telemetry data represented as a telemetry
object.
CTMM
A ctmm
movement model as from the output of ctmm.fit
.
VMM
An optional vertical ctmm
object for 3D bandwidth calculation.
fast
Use the direct algorithm if FALSE
or the FFT algorithm if TRUE
. The default behavior switches from slow to fast at length(data$t)==100
.
dt
Optional lag bin width for the FFT algorithm.
verbose
Optionally return the effective sample size DOF.H
along with the bandwidth matrix H
.
Value
matrix
object, which is to be the optimal covariance matrix of the individual kernels of the kernel density estimate.
Details
One of two algorithms is used to count the time lags. The direct method is always exact but comes at an $O(n^2)$ computational cost. The fast $O(n \log n)$ algorithm is based upon the FFT method of Marcotte (1996). This FFT method is exact for evenly scheduled data, and can account for missing observations.If no dt
is specified, the median sampling interval is used if fast=TRUE
. This is typically a good assumption for most data, even when there are gaps. By decreasing dt
, the FFT method can be made arbitrarily precise with no ill effects.
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.
Ecology, 96(5), 1182-1188.D. Marcotte. (1996). Fast variogram computation with FFT. Computers and Geosciences 22(10), 1175-1186.