Re: [R] Plotting Bi-Gamma Distribution

From: Wolfgang Raffelsberger <wraff_at_titus.u-strasbg.fr>
Date: Wed, 02 Jul 2008 18:32:28 +0200

Hi,

you can try the 'mixdist' package which allows fitting of multiple (superposed) distributions to your vector of data. The package is available on http://www.math.mcmaster.ca/peter/mix/mix.html Unfortunately this package doesn't support combination of normal with gamma etc..., but it could work for your case of 2 superposed gamma distributions.

Wolfgang

Gundala Viswanath a écrit :
> Hi Ben,
>
> Thanks for the reply.
>
>
>> The gamma distribution is always unimodal (i.e.,
>> a single peak).
>>
>
> Unless I misunderstood you. I am thinking of mixture
> of two gamma distributions. Attached paper maybe
> interest. It discuss about such bimodal mixture of gamma distributions
> (i.e. it exists).
>
> I had a look at "mixtools" package
> it has mixture modelling tools for almost all distributions
> except Gamma :-(
>
> - Gundala Viswanath
> Jakarta - Indonesia
>
>
> On Wed, Jul 2, 2008 at 9:17 PM, Ben Bolker <bolker_at_ufl.edu> wrote:
>
>> Gundala Viswanath <gundalav <at> gmail.com> writes:
>>
>>
>>> Hi all,
>>>
>>> I've tried to plot a vector which has two peaks in the density.
>>> This link shows the figure.
>>>
>>> http://docs.google.com/View?docid=dcvdrfrh_1dk9r2rc7
>>>
>>> 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
>>
>> ______________________________________________
>> 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.
>>
 

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wolfgang Raffelsberger, PhD
Laboratoire de BioInformatique et Génomique Intégratives CNRS UMR7104, IGBMC
1 rue Laurent Fries, 67404 Illkirch Strasbourg, France Tel (+33) 388 65 3300 Fax (+33) 388 65 3276 http://www-bio3d-igbmc.u-strasbg.fr/~wraff wolfgang.raffelsberger_at_igbmc.fr



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 02 Jul 2008 - 20:43:20 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 - 21:32:12 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