Skip to content
Prev 13903 / 29559 Next

Calculate area/volume of kde output from ks package

Hi

I'm trying to calculate the volume of a 3D kernel density estimator that has
been calculated using the kde command from the ks package. So far I'm just
working with the examples given before applying this to my own data so only
have that example data to give (found under "plot" of the package manual):

## trivariate example
library(MASS)
x <- iris[,1:3]
H.pi <- Hpi(x, pilot="samse")
fhat <- kde(x, H=H.pi, compute.cont=TRUE)
plot(fhat, drawpoints=TRUE)


Under a previous post about calculating the 2D spatial area of the kde
output (see full original message at the end) the following was suggested: 

"
Michael Sumner-2 wrote
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Convert-kde-object-into-spatial-object-tp4077448p7192096.html
Sent from the R-sig-geo mailing list archive at Nabble.com.