1
$\begingroup$

I would like to test how well my model fits the data. The response is binary and the Chi-Squared Test cannot be applied for the residual deviance because the $n_i$ are $1$. To use the Chi-Squared GOF Test, the $n_i$ need to be $\geq 5$. What's an alternative method can I use to test for goodness of fit?

$\endgroup$

1 Answer 1

1
$\begingroup$

First some comments on the assertions you made about chi square:

(i) The rule of thumb applies to the expected counts

(ii) That (quite old) rule of thumb is too restrictive; the chi-square approximation is usually fine if some categories have substantially lower expected values than 5.

What test might be done depends on what null you're testing against what alternative but I believe I understand - I take it you're interested in testing the model fit against the saturated model.

If you're fitting your logistic regression using GLM, it should provide you with a deviance test (also based on a chi-square approximation) which may be the goodness of fit test you're after. This corresponds to an asymptotic likelihood ratio test.

(The individual n's don't matter as much as the overall degrees of freedom.)

e.g. in R, see the examples under ?glm and ?anova.glm

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.