Hi All,
I'm calculating the parameters of gamma distribution using LMoment method. As we know that we need only two LMoments (l1 aand l2) to calculate two parameters of gamma distribution (mu, Lambda). From l2/l1, we can calculate "mu" by using an iterative procedure.
l2/l1 = (1/sqrt(pi))*(gamma(mu+1.5)/gamma(mu+2));
l2 and l1 are known !
Itry to find the best "mu" as follow:
==============
function result = reclmom(l1, l2)
mu = 0.1:0.1:100; % assuming mu in this interval
iter=1;dcnorm=1.;
while dcnorm>1E4 & iter<1000
% alpha is l2/l1
alpha(iter) = (1/sqrt(pi))*(gamma(mu(iter)+1.5)/gamma(mu(iter)+2));
dcnorm=abs((l2/l1)alpha(iter));
iter=iter+1;
P1=[iter1 dcnorm alpha(iter1) mu(iter1)];
end
result =[P1(1,4)];
=======================
I found the above iteration procedure is not so accurate to get 'mu' if I compare with 'mu' calculated by maximum likelihood method. Do you have any alternative iterative procedure instead of the above one ?
Thanks for sharing and hlep...
Cheers
Edward..
