Asked by Silas Adiko
on 20 May 2013

Dear Support,

I am fitting a distribution to data and trying to perform chi-square goodness-of-fit test.

I have calculated the likelihood values and wanted to perform goodness-of-fit test

However, having read through the Help menus, I tried to run the script below but am getting error:

*x=claims;
[h,p,stats] = chi2gof(X,'cdf','weibull',nparams,2)*

where claims is 1xn vector

I do not know where I have gone wrong and would appreciate anyone's assistance to resolve this.

**Also, I needed the script to calculate chi-square test statistic for Negative Binomial distribution.**

Much thanks in advance

*No products are associated with this question.*

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply Today
## 1 Comment

## the cyclist (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/76454#comment_150461

What's the complete error message you are getting?