Description Usage Arguments Details Value Author(s) References See Also Examples

Calculates up to three estimates of activity pattern overlap based on times of observations for two species.

1 2 | ```
overlapEst(A, B, kmax = 3, adjust=c(0.8, 1, 4), n.grid = 128,
type=c("all", "Dhat1", "Dhat4", "Dhat5"))
``` |

`A` |
a vector of times of observations of species A in radians, ie. scaled to [0, |

`B` |
a vector of times of observations of species B in radians. |

`kmax` |
maximum value of k for optimal bandwidth estimation. |

`adjust` |
bandwidth adjustment; either a single value used for all 3 overlap estimates, or a vector of 3 different values. This corresponds to |

`n.grid` |
number of points at which to estimate density for comparison between species; smaller values give lower precision but run faster in simulations and bootstraps. |

`type` |
the name of the estimator to use: |

See `overlapTrue`

for the meaning of coefficient of overlapping, *Δ*.

These estimators of *Δ* use kernel density estimates fitted to the data to approximate the true density functions *f(t)* and *g(t)*. Schmid & Schmidt (2006) propose five estimators of overlap:

Dhat1 is calculated from vectors of densities estimated at *T* equally-spaced times, *t*, between 0 and *2π*:

For circular distributions, Dhat2 is equivalent to Dhat1, and Dhat3 is inapplicable.

Dhat4 and Dhat5 use vectors of densities estimated at the times of the observations of the species, *x* and *y*:

where *n, m* are the sample sizes and *I* is the indicator function (1 if the condition is true, 0 otherwise).

Dhat5 simply checks which curve is higher at each point; even tiny changes in the data can result in large, discontinuous changes in Dhat5, and it can take values > 1. Don't use Dhat5.

Comparing curves at times of actual observations works well if there are enough observations of each species. Simulations show that Dhat4 is best when the smallest sample has at least 50 observations. Dhat1 compares curves at `n.grid`

equally spaced points, and is best for small samples.

If `type = all`

, a named vector of three estimates of overlap, otherwise a single estimate. Will be NA if optimal bandwidth estimation failed.

Mike Meredith, based on work by Martin Ridout.

Ridout & Linkie (2009) Estimating overlap of daily activity patterns from camera trap data. *Journal of Agricultural, Biological, and Environmental Statistics* 14:322-337

Schmid & Schmidt (2006) Nonparametric estimation of the coefficient of overlapping - theory and empirical application, *Computational Statistics and Data Analysis*, 50:1583-1596.

1 2 3 4 5 6 7 8 9 10 11 | ```
# Get example data:
data(simulatedData)
# Use defaults:
overlapEst(tigerObs, pigObs)
# Dhat1 Dhat4 Dhat5
# 0.2908618 0.2692011 0.2275000
overlapEst(tigerObs, pigObs, type="Dhat4")
# Dhat4
# 0.2692011
``` |

```
Dhat1 Dhat4 Dhat5
0.2908618 0.2692011 0.2275000
Dhat4
0.2692011
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.