Re: [R] Fitting a distribution to peaks in histogram

From: hadley wickham <h.wickham_at_gmail.com>
Date: Thu 20 Jul 2006 - 02:20:32 EST

> I would like to fit a distribution to each of the peaks in a histogram, such
> as this: http://photos1.blogger.com/blogger/7029/2724/1600/DU145-Bax3-Bcl-xL.png

As a first shot, I'd try fitting a mixture of gamma distributions (say 3), plus a constant term for the highest bin. You could do this using ML. If the number of peaks is truly unknown, this will be a little trickier but still possible and you could use the LRT to chose between them.

> Integrate the area between each two peaks, using the means and widths of the
> distributions fitted to the two peaks. I will be using the integrate
> function

Why do you want to do this?

>
> The histogram is based on approximately 15000 events, which makes Mclust and
> pam (which both delivers the information I need) less useful.

If you have unbinned data, it would be better (more precise/powerful) to use that.

Regards,

Hadley



R-help@stat.math.ethz.ch 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 Thu Jul 20 02:26:19 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 20 Jul 2006 - 04:17:42 EST.

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