Lina, check whether something like

data.frame(density(rnorm(10))[1:2]) 

contains the information you want. Otherwise, try to be (much) more specific in 
what you want so that we do not need to guess (and of course provide minimal, 
self-contained, reproducible code). That has a higher chance to trigger some 
responses than posting the same message again. And if you even explain what you 
want to do with these values, you might get even better responses.

HTH, Michael


> -----Original Message-----
> From: r-help-boun...@r-project.org 
> [mailto:r-help-boun...@r-project.org] On Behalf Of Lina Rusyte
> Sent: Dienstag, 29. September 2009 16:45
> To: R help
> Cc: R help
> Subject: [R] Probability of data values form DENSITY function
> 
> Hello,
> Â
> Could someone help me please and to tell how to get the 
> probability from empirical DENSITY (not parametric) for each 
> data value (R function). 
> For example, for normal distribution there is such a function like: 
> Â
> “dnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = 
> FALSE)”  I need the same function only for the empirical 
DENSITY function (which does not correspond to any typical > distribution). 
> R plots the density function of any data: 
> Â
> “plot(density(x))”
> Â
> I need to find out the probability for each data value from 
> this plot-line. 
> Â
> Best regards,
> Lina
> 
> 
>       
>       [[alternative HTML version deleted]]
> 
> 
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to