Learn R Programming

overlap (version 0.3.4.1)

getBandWidth: Optimal bandwidth calculation

Description

Calculates the optimal bandwidth for von Mises kernel density estimation for a given sample. Used internally by other functions in the package.

Usage

getBandWidth(A, kmax = 3)

Value

Optimal bandwidth for the sample data, or NA if estimation fails.

Arguments

A

a vector of times of observations in radians, ie. scaled to [0, \(2\pi\)].

kmax

maximum moment to use for estimation; see Ridout & Linkie 2009.

Author

Code by Martin Ridout, error handling modified by Mike Meredith.

References

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

Taylor (2008) Automatic bandwidth selection for circular density estimation, Computational Statistics and Data Analysis, 52:3493-3500.

Examples

Run this code
data(simulatedData)
getBandWidth(tigerObs, kmax = 3)

Run the code above in your browser using DataLab