# Functions to generate bootstrap estimates of overlap

### Description

The strategy implemented involves three steps: 1. Create a matrix of bootstrap samples for each data set, using `resample`

. 2. Use `bootEst`

to calculate estimates for each bootstrap sample and create a matrix of bootstrap estimates. 3. Process the bootstrap estimates, eg. to produce confidence intervals with `bootCI`

.

### Usage

1 2 3 |

### Arguments

`x` |
a numeric vector of time-of-capture data in |

`nb` |
the number of bootstrap samples required |

`smooth` |
if TRUE, smoothed bootstrap samples are produced. |

`Amat, Bmat` |
matrices of resampled data for each species produced by |

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

`adjust` |
bandwidth adjustment: see Details. |

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

### Details

bandwidth adjustment:

for

`resample`

, a single value.for

`bootEst`

, either a single value used for all 3 overlap estimates, or a vector of 3 different values; a NA value in`adjust`

means that the corresponding estimate will not be calculated.

### Value

The function `resample`

returns a numeric matrix with each column corresponding to a bootstrap sample. Times are in *radians*. It may return a matrix of NAs if `smooth = TRUE`

and bandwidth estimation fails.

Function `bootEst`

returns a numeric matrix with three columns, one for each estimator of overlap. If argument `adjust`

contains NAs, the corresponding columns in the output will be NAs. If bandwidth estimation fails for a bootstrap sample, the corresponding row will contain NAs.

### Author(s)

Mike Meredith, including code by Martin Ridout.

### References

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

### See Also

`bootCI`

.

### Examples

1 2 3 4 5 6 7 |