Datum: Thu, 5 Nov 2009 11:11:31 -0700
Von: Greg Snow <Greg.Snow at imail.org>
An: Justine Rochon <rochon at gmx.de>, "r-help at r-project.org" <r-help at r-project.org>
Betreff: RE: [R] Density estimate with bounds
You may be interested in the logspline package. It uses a different
method from kernel density estimation, but it estimates densities from data and
allows the specification of lower and/or upper bounds.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
project.org] On Behalf Of Justine Rochon
Sent: Thursday, November 05, 2009 2:38 AM
To: r-help at r-project.org
Subject: [R] Density estimate with bounds
Dear R users,
I would like to show the estimated density of a (0, 1) uniformly
distributed random variable. The density curve, however, goes beyond 0
and 1 because of the kernel smoothing.
Example:
x = runif(10000)
plot(density(x))
Is there a way to estimate the density curve strictly within (0, 1) and
still use some sort of smoothing?
Any help would be greatly appreciated.
Best regards,
Justine Rochon
--
GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!