[R] Question on density values obtained from kde2d() from package MASS
peter.lowenberg.neto at gmail.com
Thu Jan 23 20:04:06 CET 2014
Do you already understand kde2d output?
if I run
do I take the maximum value of the 2d density?
Em quinta-feira, 24 de novembro de 2011 16h12min19s UTC-2, Andreas Klein
> I am a little bit confused regarding the density values obtained from the
> function kde2d() from the package MASS because the are not in the intervall
> [0,1] as I would expect them to be. Here is an example:
> x <-
> y <-
> tmp <- kde2d(x=x, y=y, n=100)
> #3.621288 11989.060924
> Do I have to transform them further? Or what scale are they?
> Or did I get something wrong regarding the output because in the help file
> it reads:
> "zAn n by n matrix of the estimated density: rows
> correspond to the value of x, columns to the value of y."
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help