Animal activity patterns and overlap

Back to home page A new R package called overlap to estimate the overlapping of animal activity patterns from data derived from camera traps has now arrived on R's central depository, CRAN.

As soon as cameras with "data backs" came along in the early 90s, biologists realised that they could harvest data on the activity patterns of rare, secretive forest animals. Were they diurnal, nocturnal, crepuscular, or maybe cathemeral (active all around the clock)? More recently, people have tried to get clues about how species interact - competition or prey-predator interactions - from activity patterns, by examining the extent of overlap.

In our corner of the biological world, Martin Ridout and Matt Linkie published a paper (2009) on the activity patterns of tigers, clouded leopards and golden cats in Sumatra, with a lot of technical detail on how overlap could be quantified and confidence intervals estimated. They followed up (2011) with a paper on tigers and their prey, also in Sumatra. Martin provided the R code they had used for the analysis and shared the data set on his web site at University of Kent, UK.

I got involved with this, and we tried different kinds of bootstraps to estimate confidence intervals. Trying these out involved thousands of simulated data sets and many millions of bootstrap calculations. The original R code was slow, so I rewrote the key bits in C, called from R.

The alternative estimators we tried turned out to be better than the originals. Based on all the simulations, we could recommend particular estimators for various sample sizes.

The faster code went into the overlap package, together with our recommendations as a vignette. If you have R v.3.0 or higher (and if not, then upgrade!), you can download overlap in R via the Packages > Install packages... menu option, or you can download the source code, vignette, and binaries from CRAN.

...just one of the 4590 R packages on CRAN - as at 5 June that is, it expands daily!

I hope folks out there find it useful. Email me at the maintainer's email if you run into problems with the package or detect bugs.


Ridout, M S; M Linkie. 2009. Estimating overlap of daily activity patterns from camera trap data. Journal of Agricultural, Biological, and Environmental Statistics 14:322-337.

Linkie, M; M S Ridout. 2011. Assessing tiger-prey interactions in Sumatran rainforests. Journal of Zoology 284:224-229.

Updated 5 June 2013 by Mike Meredith