GLM Goodness of Fit Calculator

Test generalized linear models using essential goodness-of-fit diagnostics. Compare deviance, Pearson ratios, and information criteria. Visualize model quality clearly before sharing statistical conclusions externally.

Enter GLM Goodness-of-Fit Inputs

Use the responsive input grid below. It shows three columns on large screens, two on medium screens, and one on mobile.

Reset

Example Data Table

Family Link n p Null Deviance Residual Deviance Pearson Chi-Square Log Likelihood Observed Series Predicted Series
Poisson Log 120 6 182.4 126.2 118.9 -59.7 18, 22, 25, 29, 31, 34 17.5, 21.4, 24.8, 28.2, 31.6, 33.5

Formula Used

How to Use This Calculator

  1. Select the GLM family and link function that match your fitted model.
  2. Enter sample size and the total number of estimated parameters, including the intercept.
  3. Paste the null deviance, residual deviance, Pearson chi-square, and log likelihood from your model output.
  4. Set the alpha level for hypothesis checks and choose a tolerance for dispersion ratio interpretation.
  5. Optionally enter observed and predicted values to visualize calibration and residual behavior.
  6. Press Calculate Fit to display the result block above the form.
  7. Review ratios, p-values, AIC, BIC, deviance explained, and the Plotly graph together.
  8. Use the CSV and PDF buttons to export a clean report.

FAQs

1. What does residual deviance measure?

Residual deviance measures how far the fitted model is from the saturated model. Smaller values usually indicate a better fit, especially when compared with residual degrees of freedom.

2. What is the Pearson chi-square statistic?

Pearson chi-square summarizes squared differences between observed and fitted values, scaled by model variance. Dividing it by residual degrees of freedom gives a practical dispersion diagnostic.

3. When is a GLM considered well fitted?

A model often looks acceptable when deviance and Pearson ratios are near 1, p-values are not unusually small, and residual patterns do not show systematic bias.

4. Why are AIC and BIC included?

AIC and BIC help compare competing models. Lower values are generally preferred because they reward fit while penalizing unnecessary model complexity.

5. What does overdispersion mean?

Overdispersion means the observed variability is larger than the model expects. It can point to omitted predictors, clustering, dependence, or an inappropriate distributional family.

6. Can I use this for logistic regression?

Yes. Logistic regression is a binomial GLM with a logit link. The calculator can summarize common goodness-of-fit measures when you provide the relevant model output.

7. Why add observed and predicted values?

Those values make the chart more informative. They let you inspect calibration, residual behavior, average error, and whether the fitted values follow the observed pattern closely.

8. Are the p-values exact for every GLM?

No. They are usually large-sample approximations based on chi-square reference distributions. Always combine them with subject knowledge, residual checks, and alternative diagnostics.

Related Calculators

glm confidence interval calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.