Find definitions and interpretation guidance for every statistic in the Goodness-of-fit tests table.

The deviance 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
- Overdispersion

If the deviation is statistically significant, you can try a different link function or change the terms in the model.

For binary logistic regression, the format of the data affects the p-value because it changes the number of trials per row. The p-value for the deviance test usually decreases as the number of trials per row decreases. The Hosmer-Lemeshow test does not depend on the format of the data. When the data have few trials per row, the Hosmer-Lemeshow test is a more trustworthy indicator of how well the model fits the data. For more information, go to How data formats affect goodness-of-fit in binary logistic regression.

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
- Overdispersion

If the deviation is statistically significant, you can try a different link function or change the terms in the model.

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. The Hosmer-Lemeshow test does not depend on the format of the data. When the data have few trials per row, the Hosmer-Lemeshow test is a more trustworthy indicator of how well the model fits the data. For more information, go to How data formats affect goodness-of-fit in binary logistic regression.

The Hosmer-Lemeshow goodness-of-fit test compares the observed and expected frequencies of events and non-events to assess how well the model fits the data.

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
- Overdispersion

If the deviation is statistically significant, you can try a different link function or change the terms in the model.

The Hosmer-Lemeshow test does not depend on the number of trials per row in the data as the other goodness-of-fit tests do. When the data have few trials per row, the Hosmer-Lemeshow test is a more trustworthy indicator of how well the model fits the data.

The model predicts the expected frequencies for the Hosmer-Lemeshow test.

Use the observed and expected frequencies for the Hosmer-Lemeshow test to describe how well the model fits the data or to look for areas of poor fit.

For example, the model with the term X produces goodness-of-fit tests with small p-values, which indicates that the model fits the data poorly. In the table of observed and expected frequencies, the expected values were different by more than 10 events for all of the groups except for group 4, when the probability of the event is between 0.32 and 0.325.

When the model includes X and X*X, the goodness-of-fit tests have large p-values. The data do not provide evidence that the estimated probabilities deviate from the observed probabilities in a way that the binomial distribution does not predict. The largest difference between the observed and expected number of events is in group 4. This difference is approximately 7.

Coefficients
Term Coef SE Coef VIF
Constant -0.800 0.167
X 0.00092 0.00271 1.00

Goodness-of-Fit Tests
Test DF Chi-Square P-Value
Deviance 3 78.50 0.000
Pearson 3 74.96 0.000
Hosmer-Lemeshow 3 74.96 0.000

Observed and Expected Frequencies for Hosmer-Lemeshow Test
Event
Probability Event Non-event
Group Range Observed Expected Observed Expected
1 (0.000, 0.310) 10 31.0 90 69.0
2 (0.310, 0.315) 40 31.5 60 68.5
3 (0.315, 0.320) 60 32.0 40 68.0
4 (0.320, 0.325) 35 32.5 65 67.5
5 (0.325, 0.330) 15 33.0 85 67.0

Response Information
Event
Variable Value Count Name
Event Event 160 Event
Non-event 340
Trial Total 500

Coefficients
Term Coef SE Coef VIF
Constant -2.107 0.282
X 0.0904 0.0121 11.97
X*X -0.000889 0.000115 11.97

Goodness-of-Fit Tests
Test DF Chi-Square P-Value
Deviance 2 3.78 0.151
Pearson 2 3.76 0.152
Hosmer-Lemeshow 3 3.76 0.288

Observed and Expected Frequencies for Hosmer-Lemeshow Test
Event
Probability Event Non-event
Group Range Observed Expected Observed Expected
1 (0.000, 0.108) 10 10.8 90 89.2
2 (0.108, 0.124) 15 12.4 85 87.6
3 (0.124, 0.401) 40 40.1 60 59.9
4 (0.401, 0.419) 35 41.9 65 58.1
5 (0.419, 0.548) 60 54.8 40 45.2