Ideally, I would input a one-dimensional array of data, and output the estimates for the three parameters. I'm not very familiar with any statistics software but I have MATLAB (and all of the free software available, I suppose).
-
1$\begingroup$ When the scale and offset parameters are the same, this convolution is just another Gamma distribution. If that's the case, you only need to estimate the Gamma parameters. There are many ways, though: which are good depend on how you intend to use those estimates. $\endgroup$– whuber ♦Nov 26, 2012 at 17:00
1 Answer
I would try using EM.
Suppose that your exponential distribution is X, and your gamma distribution is Y. We will learn their distributions in a Bayesian way since both are exponential families.)
Now, for each training example $z$, we will find $x$ and $y$ such that $z=x + y$ where we assume that $x$ was drawn from $X$ and $y$ was drawn from $Y$. Then, we will update the parameters in a Bayesian way.
To find $x$ and $y$, we run a simple bounded minimizer, and minimize the log-likelihood of $P(X=x, Y=y)$. (Ideally, we would use the posterior predictive distribution, but it's probably best to get this working first.)
To update the parameters, we let the mean of $X$ be $E(x)$, the mean of $Y$ is $E(y)$, and $E(\log(Y)) = E(\log(y))$. This is the standard Bayesian update. You will probably want a different parametrization of the Gamma distribution, but that is a different question I think.
I've had pretty good results with this kind of approach. Convergence can be made faster by throwing out some of the old data. (Above, the calculation of expectations relies on totals and counts — throwing out data is scaling these quantities.)
-
$\begingroup$ If you were will to start simply (walk or crawl before running) you might wish to try stats.stackexchange.com/questions/41794/… with other intro here stats.stackexchange.com/questions/44244/ap-statistics-exam/… If you wish, I could provide some initial R code. $\endgroup$– phaneronNov 26, 2012 at 13:29