Skip to content
Back to formatted view

Raw Message

Message-ID: <53E88929.3090904@stamats.de>
Date: 2014-08-11T09:13:13Z
From: Matthias Kohl
Subject: C.D.F
In-Reply-To: <DUB125-W352497DED0595A92B57C7AC6ED0@phx.gbl>

Dear Diba,

you could try package distr; eg.

library(distr)
G1 <- Gammad(scale = 0.7, shape = 0.5)
G2 <- Gammad(scale = 2.1, shape = 1.7)
G3 <- G1+G2 # convolution
G3

For the convolution exact formulas are applied if available, otherwise 
we use FFT; see also http://www.jstatsoft.org/v59/i04/ (will appear 
soon) resp. a previous version at http://arxiv.org/abs/1006.0764

hth
Matthias

Am 11.08.2014 um 10:17 schrieb pari hesabi:
> Hello everybody,
>
> Can anybody help me to write a program for the CDF of sum of two independent gamma random  variables ( covolution of two gamma distributions)  with different amounts of parameters( the shape parameters are the same)?
>
> Thank you
>
> Diba
>   		 	   		
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

-- 
Prof. Dr. Matthias Kohl
www.stamats.de