The Pearson goodness-of-fit test assesses the discrepancy between the current model and the full model.
Use the goodness-of-fit tests to determine whether the predicted probabilities deviate from the observed probabilities in a way that the binomial distribution does not predict. If the p-value for the goodness-of-fit test is lower than your chosen significance level, the predicted probabilities deviate from the observed probabilities in a way that the binomial distribution does not predict. This list provides common reasons for the deviation:
- Incorrect link function
- Omitted higher-order term for variables in the model
- Omitted predictor that is not in the model
If the deviation is statistically significant, you can try a different link function or change the terms in the model. To use a different link function, you should use Binary Fitted Line Plot or Fit Binary Logistic Regression in Minitab Statistical Software.
For binary logistic regression, the format of the data affects the p-value because it changes the number of trials per row. The approximation to the chi-square distribution that the Pearson test uses is inaccurate when the expected number of events per row in the data is small. Thus, the Pearson goodness-of-fit test is inaccurate when the data are in Binary Response/Frequency format.