- Thread starter dr_rk
- Start date
- Tags chi-squared goodness of fit non-linear regression

I really don't think that test applies here (at least in the form the OP wrote it). And even if it did I don't think the null would be that the predicted and observed are equal...

Last edited:

I think the answer in your cross-post does a much better job at answering your question (and makes me think hard about the validity of my answer in post #2, the null hypothesis is at the very least incorrectly stated )

http://stackoverflow.com/questions/12618082/goodness-of-fit-with-matlab-and-chi-square-test

http://stackoverflow.com/questions/12618082/goodness-of-fit-with-matlab-and-chi-square-test

Last edited:

You don't say whether you have replicate observations or not. However, you can construct a lack of fit test if you have replicate observations for your x variable.

1) You can estimate the pure error sums of square (SS_pure) by fitting a completely randomised design (i.e. x as a class variable).

2) You can obtain residual sums of square from your non-linear model (SS_nlin).

3) Then Your lack of fit SS will be the difference between 1 and 2.

4) Finally you can partition the residual SS from your non-linear model into pure error and lack of fit and constuct your F test to judge the lack of fit of your non-linear model.

HTH