[R] ML fit of gamma distribution to grouped data

Thomas Petzoldt petzoldt at rcs.urz.tu-dresden.de
Tue Nov 28 12:26:16 CET 2006


Hello,

we have a set of biological cell-size data, which are only available as 
frequencies of discrete size classes, because of the high effort of 
manual microscopic measurements.

The lengths are approximately gamma distributed, however the shape of 
the distribution is relatively variable between different samples (maybe 
it's a mixture in reality).

Is there any ML fitting (or moment-based) procedure for the gamma 
distribution and grouped data already available in R?

Here is a small example:

breaks <- c(0, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150)
mids   <- c(10, 25, 35, 45, 55, 65, 75, 85, 95, 125)
counts <- c(87, 5, 2, 2, 1, 1, 0, 0, 1, 1)

Any help is highly appreciated

Thomas P.



More information about the R-help mailing list