[R] 2 D non-parametric density estimation

John Fieberg John.Fieberg at dnr.state.mn.us
Wed Oct 22 23:40:40 CEST 2003


I have spatial data in 2 dimensions - say (x,y).  The correlation
between x and y is fairly substantial.  My goal is to use a
non-parametric approach to estimate the multivariate density describing
the spatial locations.  Ultimately, I would like to use this estimated
density to determine the area associated with a 95% probability contour
for the data.

Given the strong correlation between x and y, I have not been real
happy w/ the results obtained using kernel density estimators with
separate smoothing parameters for the x and y directions - e.g., bkde2D
(KernSmooth library), sm (sm library), kde2d (MASS library).   It seems
to me that a better alternative would be to transform the data to have
~0 correlation, estimate the density, then transform back to the
original scale.  Does this seem reasonable for this sort of problem? 
Has anyone written code in R to do this sort of thing?

I also attempted to explore local likelihood fitting (using locfit
library).  I liked the look of the estimated densities, but found it
difficult to obtain predictions at an arbitrary set of grid points (as
needed to determine a 95% probability contour).  Does anyone have
examples using locfit w/ the "ev" option or predict.locfit in order to
obtain local likelihood density estimates at an arbitrary set of grid
points?  

Any suggestions would be greatly appreciated!

John

John Fieberg, Ph.D.
Wildlife Biometrician, MN DNR
5463-C W. Broadway
Forest Lake, MN 55434
Phone: (651) 296-2704




More information about the R-help mailing list