Prev: beginner matlab question - finding values from two different matrices
Next: Finding max of simple function
From: Kumaresh Dhara on 10 Jun 2010 01:01 I wanted to fit gamma and other distributions other than normal to a given data. but i found that the inbuilt chi2gof function only fits normal distribution. Is there any other command that might help me?? I found histfit effective while considering the graphical representation and found it quite effective. But this function does not give any measure of degree of good fitting. Please help
From: Peter Perkins on 10 Jun 2010 08:27
On 6/10/2010 1:01 AM, Kumaresh Dhara wrote: > I wanted to fit gamma and other distributions other than normal to a > given data. but i found that the inbuilt chi2gof function only fits > normal distribution. Kumeresh, that's not correct for two reasons: 1) CHI2GOF supports _any distribution, it's simply that normal is the default. The reference page <http://www.mathworks.de/access/helpdesk/help/toolbox/stats/chi2gof.html> in the current documentation says, "The null distribution can be changed from a normal distribution to an arbitrary discrete or continuous distribution. See the syntax for specifying optional argument name/value pairs below." and then goes on to describe how you specify a non-normal null distribution using either a CDF or expected bin counts. There are examples of both. 2) CHI2GOF doesn't fit a distribution, it compares observed bin counts to expected bin counts, and computes a goodness of fit statistic that describes how closely the two match up. If you want to fit a distribution, you should look at the MLE function, or any one of the functions such as GAMFIT, POISSFIT, etc., that fit specific distributions. Hope this helps. |