[R] bivariate kernel density estimates at point locations ( r ather than at grid locations)
Liaw, Andy
andy_liaw at merck.com
Thu Dec 15 21:52:25 CET 2005
You can try `locfit', though it does local likelihood, rather than
garden-variety kernel density estimation. Here's an example:
library(locfit)
data(cldem)
den.fit <- locfit(~ x1 + x2, data=cltrain)
predict(den.fit, newdata=cltrain)
Andy
From: Strickland, Matthew
>
> Hi,
>
> My data consists of a set of point locations (x,y).
>
> I would like to know if there is a procedure for bivariate kernel
> density estimation in R that returns the density estimates at the
> observed point locations rather than at grid locations. I
> have looked at
> a number of different routines and they all seem to return
> estimates at
> grid locations.
>
> Any type of kernel is fine (i.e., Gaussian, Quartic, etc).
>
> Thank you for your help!
>
> Matt Strickland
> U.S. Centers for Disease Control and Prevention
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
More information about the R-help
mailing list