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

`bootstrap`

takes two sets of times of observations and calculates bootstrap estimates of the chosen estimator of overlap. Alternatively, bootstrap estimates can be calculated in a 2-stage process: (1) create a matrix of bootstrap samples for each data set, using `resample`

; (2) pass these matrices to `bootEst`

to obtain the bootstrap estimates.

A vector of bootstrap estimates can then be used to produce confidence intervals with `bootCI`

.

1 2 3 4 5 6 7 |

`A, B` |
vectors of times of observations of two different species in radians, ie. scaled to [0, |

`nb` |
the number of bootstrap samples required |

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

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

`adjust` |
bandwidth adjustment. If |

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

`type` |
the name of the estimator to use, or "all" to produce all three estimates. See |

`cores` |
the number of cores to use for parallel processing. If NA, all but one of the available cores will used. Parallel processing may take longer than serial processing if the bootstrap runs quickly. |

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

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

The function `bootstrap`

returns a vector of bootstrap estimates. If estimation fails for a bootstrap sample, the corresponding value will be NA.

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`

with `type = "all"`

returns a numeric matrix with three columns, one for each estimator of overlap, otherwise a vector of bootstrap estimates.

Mike Meredith, including code 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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
data(simulatedData)
est <- overlapEst(tigerObs, pigObs, type="Dhat4")
boots <- bootstrap(tigerObs, pigObs, 99, type="Dhat4")
mean(boots)
hist(boots)
bootCI(est, boots)
# alternatively:
tigSim <- resample(tigerObs, 99)
dim(tigSim)
pigSim <- resample(pigObs, 99)
boots <- bootEst(tigSim, pigSim, type="Dhat4")
mean(boots)
``` |

overlap documentation built on May 17, 2021, 9:09 a.m.

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.