densityFit {overlap} | R Documentation |
Fits von Mises kernel density to time-of-day data.
Description
Fits von Mises kernel density to time-of-day data. Intended primarily for internal use: input checking is minimal.
Usage
densityFit(x, grid, bw)
Arguments
x |
a vector of times of observations in radians, ie. scaled to [ |
grid |
a vector of times in radians for which the density is required. This could be a vector of equidistant values in [ |
bw |
bandwidth, the concentration parameter for the von Mises kernel: smaller values result in smoother curves. |
Value
Returns a vector of densities corresponding to the times in grid.
Author(s)
C code written by Mike Meredith.
See Also
getBandWidth
for appropriate bandwidth.
Examples
# Get example data:
data(simulatedData)
densityFit(tigerObs, c(0, pi/2, pi, 3*pi/2, 2*pi), 50)
# Densities at 6am and 6pm are fairly high, at midnight and midday, tiny.
# A crepuscular species!
[Package overlap version 0.3.9 Index]