Truncated kernel density derivative estimate
Truncated kernel density derivative estimate for 2-dimensional data.
kde.truncate(fhat, boundary) kdde.truncate(fhat, boundary)
fhat |
object of class |
boundary |
two column matrix delimiting the boundary for truncation |
A simple truncation is performed on the kernel estimator. All the
points in the estimation grid which are outside of the regions
delimited by boundary
are set to 0, and their probability
mass is distributed proportionally to the remaining density (derivative) values.
A truncated kernel density (derivative) estimate inherits the same object class as the input estimate.
library(oz) data(grevillea) wa.coast <- ozRegion(section=1) wa.polygon <- cbind(wa.coast$lines[[1]]$x, wa.coast$lines[[1]]$y) fhat <- kde(x=grevillea) fhat <- kde.truncate(fhat, wa.polygon) oz(section=1) plot(fhat, add=TRUE, cont=seq(10,90,by=10), col=2, drawlabels=FALSE, drawpoints=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.