Function Reference: gamfit

statistics: MLE = gamfit (data)

Calculate gamma distribution parameters.

Find the maximum likelihood estimate parameters of the Gamma distribution of data. MLE is a two element vector with shape parameter A and scale B.

This function works by minimizing the value of gamlike for the vector R. Just about any minimization function will work, all it has to do is minimize for one variable. Although the gamma distribution has two parameters, their product is the mean of the data. So a helper function for the search takes one parameter, calculates the other and then returns the value of gamlike.

See also: gamcdf, gampdf, gaminv, gamrnd, gamlike

Source Code: gamfit