Skip to content

density estimate

2 messages · Lavan, Eik Vettorazzi

#
Hi,

I have a vector or random variables and I'm estimating the density using
"bkde" function in the KernSmooth package. The out put contains two vectors
(x and y), and the R documentation calls y as the density estimates, but my
y-values are not exact density etstimates (since these are numbers larger
than 1)! what is y here? Is it possible to get the true estimated density at
each value of x?

Thanks
#
Hi Lavan,
a continuous density is not restricted to be within [0, 1]. Its only 
bound to have an integral of 1.
For example
dnorm(0,sd=.1)
is a very common density and gives 3.989423. A density function is not a 
probability function!
If you think your data x is discrete than you can assign the correct 
probability mass for each data point by
 prop.table(table(x))

hth.

Lavan schrieb: