[R] 3D density estimation

Liaw, Andy andy_liaw at merck.com
Mon Dec 9 15:48:03 CET 2002


I believe the sm package has functions for estimating (and even plotting?)
3D kernel density estimates.

Another possibility is the locfit package (currently in the "devel" section
on CRAN, because it hasn't been updated for the latest version of R, but may
still largely work).

(Both of these packages are companion software for books, so you may want to
check out those books.)

HTH,
Andy

-----Original Message-----
From: Chris Knight
[mailto:christopher.knight at plant-sciences.oxford.ac.uk]
Sent: Monday, December 09, 2002 9:04 AM
To: r-help at stat.math.ethz.ch
Subject: [R] 3D density estimation


I am trying to carry out density estimation for three dimensions 
(with anywhere between a few hundred and ~8000 data points). Which 
leads me to ask:

a) is there any equivalent to kde2d (in MASS) or bkde2D (in 
KernSmooth) out there for three dimensions?

b) if not, my skills only seem to extend as far as writing a function 
which measures density as the number of data points falling within a 
sphere at each point on a 3D grid. The results for  spheres of the 
minimum size to cover all the space (i.e. slightly intersecting) on a 
30x30x30 mesh don't seem too bad.
  i) How inadequate is such an analysis likely to be for subsequent 
comparison of different density distributions?
ii) Is there anything equally simple I could implement which might be 
preferable?

Any help much appreciated,

Chris
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr. Christopher G. Knight               Tel:+44 (0)1865 275 111
Department of Plant Sciences              +44 (0)1865 275 790
South Parks Road
Oxford          OX1 3RB
UK                                                                 ` 
· . , ,><(((º>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

______________________________________________
R-help at stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message.  If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it.




More information about the R-help mailing list