[R] density estimates for fixed points

David Winsemius dwinsemius at comcast.net
Mon Feb 15 15:22:49 CET 2010


On Feb 15, 2010, at 8:08 AM, geir wrote:

>
> Problem:
> Based on a n x 2 data matrix i want a kernel estimate of the bivariate
> density.


> However, i also wish to specify wich points the density should be
> calculated at.
>
> I can offcourse just write the full kernel density estimate as a R- 
> code, but
> surely there must already exist some package for this operation?
>
> The package density(),

Where did you get said package? (I tried CRAN, BioC and R-Forge  
without success.) Or are you perhaps confused about the difference  
between functions and packages, as the use of "()" after a "package"  
name might suggest??


Aside from that concern, try:

library(MASS)
?kde2D

Lets you determine the grid.

Or:

RSiteSearch("2D grid")   # 153 hits with a fairly wide range of  
potential solutions

> seems to create a new matrix (depending on n), where
> the density is estimated. But i dont know how to specify the points  
> for this
> package.
>
>
-- 
David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list