calculate goodness of fit matlab

不想你离开。 提交于 2019-12-02 14:27:53

问题


I have a set of observations obs.

If I plot the histogram of the observation I see that they could come from a gamma distribution

[counts,x] = hist(obs,[1:max(obs)]);

I would like to prove it using chi square goodness of fit.

So I first estimate the gamma parameters

paramEsts = fitdist(obs,'Gamma');  

and the use chi2gof to see if the hypotesis is true (h=0).

[h,p] = chi2gof(obs,'CDF',paramEsts)

My problem is that I get a p = NaN...how is it possible? Where is my mistake? Thanks

to test it please download the obs.mat file https://drive.google.com/file/d/0B3vXKJ_zYaCJbHU2SHhac29MRms/view?usp=sharing

来源:https://stackoverflow.com/questions/26962457/calculate-goodness-of-fit-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!