Re: Doing Goodness of Fit test in dfittool



There are some simple methods that people use, but the real answer is that there is no simple way to know what different kinds of discrepancies matter in any given situation, and one distribution may fit the data well in the "center", while another may fit it well in the "tails".

If two models are "nested", i.e., one is a special case of the other, then you can do a hypothesis test, using the difference in the log-likelihood, of the the null hypothesis that the simpler model is correct. If two models are not nested, people often use the AIC or BIC to compare models. You can also compare the Kolmogorov-Smironov or Anderson-Darling statistics of data against different models -- though it's difficult to use these as an absolute measure of g.o.f. when you've estimated the distributions' parameters, they are useful as a relative measure.

Regardless of the measure, goodness-of-fit does not imply a "good" model specification. This is a common misconception. Though measures like AIC and BIC try to balance overfitting with penalties for extra parameters, they really say nothing about how well a model describes the data-generating process (DGP). Most families of distributions have their origins in describing a particular type of DGP. Identifying a suitable family to fit to a particular data set is often the most difficult part of the process. It involves a combination of empirical evidence, gathered from distribution plots (such as looking at CDF of PDF plot) and distribution tests, but also any a priori knowledge that may be available (or can be reasonably assumed) about the DGP. In short, goodness of fit can't substitute for knowledge of the data and knowledge of what the various distribution families are meant to model.


-Ting Su
Mathworks

thiago silva wrote:
"Alan Leung" <twaleung@xxxxxxxxxxxxxxxxxxxx> wrote in message <fnlb4d$kpo$1@xxxxxxxxxxxxxxxxxx>...
Hi,

I am using dfittool to evaluate the best distribution that applies to my data. I am wondering if dfittol provides goodness of fit test so that I can make the decisions on choosing the best fitting of distribution.

Thanks,

Alan


Hi Allan,

Did you get your answer? I am facing the same problem...


Thiago.
.


Loading