[R] Fitting a distribution to peaks in histogram

Ulrik Stervbo ulriks at ruc.dk
Wed Jul 19 18:56:32 CEST 2006


On 7/19/06, hadley wickham <h.wickham at gmail.com> wrote:
> > 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.

Can you be a bit more excact? I a biologist and relatively new to R

>
> > 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?

I am measureing the amount of DNA in cells, and I need to know the
percentage of cells in a part of the cell cycle; that the percentage
of cells in the first peak, in the second peak and so on. I want to
integrate the area between to two cells, because that apparently is
how its none (as far as I can tell from the literature)

>
> >
> > 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.

It very probably is better, but mclust had no result after running for
at least 2 hours (I terminated the function after two hours), and as I
generate 50-100 datasets, such as the one used for the histogram, as
week, I would like to find a faster solution
>
> Regards,
>
> Hadley
>

Thanks
Ulrik
-- 
Blog: http://ulrikstervbo.blogspot.com



More information about the R-help mailing list