Autocorrelated Kernel Density Estimation

Chris H. Fleming and Justin M. Calabrese

2016-05-13

In this vignette we walk through autocorrelated kernel density estimation. We will assume that you have already estimated a good ctmm movement model for your data. For demonstration purposes we will be working from the results of the “Variograms and Model Selection” vignette (see vignette("variogram")).

library(ctmm)
data(buffalo)
cilla <- buffalo[[1]]
M0 <- ctmm.fit(cilla) # no autocorrelation timescales
m2 <- ctmm(tau=c(6*24,1)*60^2) # ~ 6 day and 1 hour autocorrelation timescales
M2 <- ctmm.fit(cilla,m2) 

M0 is the innapropriate, uncorrelated model, which will result in a conventional kernel-density estimate, while M2 is the vastly superior, continuous-velocity model. Now we can calculate an akde object for each model.

UD0 <- akde(cilla,M0)
UD2 <- akde(cilla,M2)

Now let us plot the results.

plot(cilla,UD=UD0,ylim=c(-14,12)*1000)
title("M0")
plot(cilla,UD=UD2,ylim=c(-14,12)*1000)
title("M2")

A more useful function for plotting in R-studio is zoom(cilla,UD=UD2), which adds a zoom slider.

By default both the density function and its 95% contours are plotted along with the location data. The middle contour represent the maximum likelihood area where the animal spends 95% of its time. This percentage can be changed with the level.UD option (see help(plot.telemetry)). The inner and outer contours correspond to confidence intervals on the magnitude of the area, which can be adjusted with the level option.

The optimal bandwidth determines the “resolution” of the kernel density estimate. By default we plot grid lines with dimensions matching the standard deviations of the individual kernels. This gives a rough guideline as to what spatial details are and are not important in the density estimate. One can see that the conventional, uncorrelated estimate fits tightly to the data and reports many significant details in the buffalo’s home range, including a hole near the coordinate (45,5) km. The autocorrelated estimate predicts future space use more accurately, based on its diffusion model, and yields a more honest account of its uncertainties. In particular, the AKDE home-range area appears larger and the presence of a hole near (45,5) cannot be resolved because its resolution is (appropriately) insufficient.

Finally, we can compare the area estimates.

summary(UD0)
## $DOF
##      area bandwidth 
##  3527.000  3528.014 
## 
## $CI
##                               low       ML     high
## area (square kilometers) 258.2631 267.0029 275.8861
summary(UD2)
## $DOF
##      area bandwidth 
##   22.9881   39.7542 
## 
## $CI
##                               low       ML     high
## area (square kilometers) 244.5244 385.7882 558.7413