On 05/09/2008 4:32 PM, pragmatic wrote:
Hello!
Please, anybody help me.
Can I calculate area of density was created by:
D <- density(x)
In other words I want to know area under curve 'plot(D)'
That should be 1.
and It's good to calculate area before and after 0 separately.
That's harder, but a good approximation should be sum(x < 0)/length(x)
and sum(x > 0)/length(x).
Duncan Murdoch
______________________________________________
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.