[R] density estimate

Eik Vettorazzi E.Vettorazzi at uke.uni-hamburg.de
Mon Sep 29 13:39:20 CEST 2008


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:
> 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
>
>
>   

-- 
Eik Vettorazzi
Institut für Medizinische Biometrie und Epidemiologie
Universitätsklinikum Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/42803-8243
F ++49/40/42803-7790



More information about the R-help mailing list