Re: [R] C.D.F

2014-08-11 Thread Rolf Turner
On 11/08/14 20:17, pari hesabi wrote: 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)? Is this homework? Th

Re: [R] C.D.F

2014-08-11 Thread Prof. Dr. Matthias Kohl
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/ (w

[R] C.D.F

2014-08-11 Thread 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