Re: [R] Plotting Bi-Gamma Distribution

From: Ben Bolker <>
Date: Wed, 02 Jul 2008 12:17:53 +0000 (UTC)

Gundala Viswanath <gundalav <at>> writes:

> Hi all,
> I've tried to plot a vector which has two peaks in the density.
> This link shows the figure.
> The red line is normal curve and green line is gamma curve.
> Notice that red line can correctly fit the histogram that has two peaks
> (i.e. red curve also has two peaks).
> But the gamma curve there only has one curve.
> Is there a way I can fit the gamma function such that it also
> yields two peaks?

  The gamma distribution is always unimodal (i.e., a single peak). (You call the red line a "normal curve", but it's really a nonparametric density estimate.) You might want to search the list and the available packages for "mixture models", which are a standard way of fitting multimodal distributions ...

  Ben Bolker mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 02 Jul 2008 - 12:20:31 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 02 Jul 2008 - 14:31:04 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive