exact.kde {eHDPrep} | R Documentation |
Exact kernel density estimation
Description
Calculates KDE for a set of points exactly, rather than an approximation as per the density() core function.
Usage
exact.kde(x, bw, output.domain = x, na.rm = FALSE)
Arguments
x |
A numeric vector of values |
bw |
The bandwidth to use - either a single value, or a vector of
values the same length as |
output.domain |
The domain of values over which to estimate the
density. Defaults to |
na.rm |
Remove missing values if |
Details
Only tractable for around 10,000 data points or less - otherwise consider using the density() core function for a close approximation.
The density() core function approximation is normally a very good approximation, but some small values close to zero may become zero rather than just very small. This makes it less suitable for mutual information estimation.
Value
The exact kernel density estimate as a density
object,
compatible with R's density
function.
Author(s)
Alexander Lyulph Robert Lubbock, Ian Overton