Skip to content
Prev 59157 / 398502 Next

Cross-correlated variables in kernel density estimation

Hi Andy,
Sorry about the vague subject line. I think I overlooked a lot of things
including the description of the function itself. Anyway, you have got the
essence of my question. Thanks for the reply. 

I am using kernel density estimation to estimate the pdf some data. The pdf
estimation is an intermediate step in a modeling work. So, I can work with
one variable at a time and combine the final results from my model in some
way but I thought it would be good to look at the joint PDF. The problem is,
my (X,Y) data have a correlation structure.  

Thanks,
Adam

----------------------------------------------------------------------------
Adam K. Gobena
Research Assistant, Water Resources Engineering
Department of Civil & Environmental Engineering
220 Civil/Electrical Eng Bldg
University of Alberta
Edmonton, AB
CANADA T6G 2G7
 

-----Original Message-----
From: Liaw, Andy [mailto:andy_liaw at merck.com] 
Sent: Tuesday, November 16, 2004 6:06 PM
To: 'Adam Gobena'; r-help at stat.math.ethz.ch
Subject: RE: [R] Cross-correlated variables in kernel density estimation
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
----------------------------------------------------------------------------
--
Notice:  This e-mail message, together with any attachments,...{{dropped}}