Adam Gobena
2004-Nov-17 00:44 UTC
[R] Cross-correlated variables in kernel density estimation
Hi, I am wondering if the kde2d 2-D kernel density estimation function in the MASS package can take into account the effect of correlations between the variables. I couldn't find any achieved information on this issue. Unfortunately, I don't have the 2002 edition of Modern Applied Statistics with S by Venables and Ripley in case it was described there. Thanks in advance. Adam ---------------------------------------------------------------------------- Adam Kenea Gobena Research Assistant, Water Resources Engineering Department of Civil & Environmental Engineering 220 Civil/Electrical Eng Bldg University of Alberta Edmonton, AB CANADA T6G 2G7
Liaw, Andy
2004-Nov-17 01:05 UTC
[R] Cross-correlated variables in kernel density estimation
> From: Adam Gobena > > Hi, > I am wondering if the kde2d 2-D kernel density estimation > function in the > MASS package can take into account the effect of correlations > between the > variables. I couldn't find any achieved information on this issue. > Unfortunately, I don't have the 2002 edition of Modern > Applied Statistics > with S by Venables and Ripley in case it was described there.The subject of your message doesn't seem to have much to do with your question... Also, it's not clear to me what you mean by taking into account the effect of correlations between variables. Do you mean a kernel function that is something like a bivariate Gaussian density with non-diagonal covariance matrix? If so, ?kde2d in MASS says: Two-dimensional kernel density estimation with an axis-aligned bivariate normal kernel, evaluated on a square grid. so the answer is no. No other R packages that does 2D kernel density estimation (that I know of, anyway) can do it, either, and probably for a good reason. Why would you need it? If there are correlation structures in the (X, Y) data, small enough bandwidths in both direction should give satisfactory estimate of the density. Andy> Thanks in advance. > Adam > -------------------------------------------------------------- > -------------- > Adam Kenea Gobena > Research Assistant, Water Resources Engineering > Department of Civil & Environmental Engineering > 220 Civil/Electrical Eng Bldg > University of Alberta > Edmonton, AB > CANADA T6G 2G7 > > ______________________________________________ > 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 > >
Prof Brian Ripley
2004-Nov-17 07:27 UTC
[R] Cross-correlated variables in kernel density estimation
Yes it can and it is in the reference. On Tue, 16 Nov 2004, Adam Gobena wrote:> Hi, > I am wondering if the kde2d 2-D kernel density estimation function in the > MASS package can take into account the effect of correlations between the > variables. I couldn't find any achieved information on this issue. > Unfortunately, I don't have the 2002 edition of Modern Applied Statistics > with S by Venables and Ripley in case it was described there.-- 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