Re: [R] Density estimation

From: Greg Snow <Greg.Snow_at_imail.org>
Date: Wed, 23 Apr 2008 09:47:20 -0600

Look at the logspline package. It has a different way of estimating densities that allows for limits to be specified (i.e. probability is 0 beyond the point(s) you specify).

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 Gunther Jansen
> Sent: Wednesday, April 23, 2008 4:59 AM
> To: r-help_at_r-project.org
> Subject: [R] Density estimation
>
> Hi,
>
> I am analysing a dataset containing genetic distances within
> and between species. I want to show a overlap of the
> distributions of the intra- and interspecific values; on a
> second graph I use a cut-off value to determine these
> boundaries. As the dataset contains >30 000 values, I would
> like to do this with a simple line rather than superimposed
> histograms. Hence, density plots. With the standard settings
> of plot(density(x)), I receive the desirable result, except
> that the function extends slightly in negative x values
> (which is impossible, distance values are always positive).
> Furthermore, in the second figure I supplied the cut-off
> value a priori, so overlap between the two classes is zero by
> definition. Is there a way to visualise this information in
> another way, or to readjust the density parameters so
> intraspecific values below zero have zero probability in the
> first case, and there is no overlap in the second case?
>
>
> Thanks,
>
> gunther
>
> ______________________________________________
> R-help_at_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.
>
______________________________________________ R-help_at_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.
Received on Wed 23 Apr 2008 - 17:21:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 Apr 2008 - 17:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive