[R] Persp plotting of kernel density estimate.
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Mar 17 19:40:10 CET 2004
On Wed, 17 Mar 2004, C Peroni wrote:
> Dear All,
>
> I am trying to visualize the surface of a bivariate kernel density
> estimate.
> I have a vector of bivariate observations(x,y), and a function which
> computes the kernel density estimate z corresponding to each
> observation. I cannot generate the (x,y) data in the ascending order
> needed by persp(x,y,z).
> I was wondering whether there is an R version of the S function interp.
There is, in package akima.
But, you really want to be interpolating in the kde: both MASS and
KernSmooth have functions to do 2D kde for you.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list