How to Determine Which Model Has a Better Fit — Through One Example

 











1. Deviance Residuals

These are the differences between observed and predicted values, adjusted for the model's distribution. The summary shows:

  • Min: -6.5037
  • 1Q (1st Quartile): -1.5778
  • Median: -0.1833
  • 3Q (3rd Quartile): 1.3519
  • Max: 6.3167

These values help assess the symmetry and spread of residuals. Ideally, they should be symmetrically distributed around zero.


🔹 2. Dispersion Parameter

  • Value: 6.437133
  • For a Gaussian (normal) model, this is the estimated variance of the residuals. It reflects how much the data points deviate from the model's predictions.

🔹 3. Null Deviance

  • Value: 917.69 (on 107 degrees of freedom)
  • This measures the deviance (lack of fit) of a model with no predictors (only the intercept). It serves as a baseline for comparison.

🔹 4. Residual Deviance

  • Value: 682.34 (on 106 degrees of freedom)
  • This is the deviance of the fitted model (with predictors). A large reduction from the null deviance indicates that the predictor(s) (in this case, age) improve the model fit.

🔹 5. AIC (Akaike Information Criterion)

  • Value: 511.58
  • AIC balances model fit and complexity. Lower AIC values indicate a better model, penalizing for adding too many predictors.



MetricModel AModel BInterpretation
Residual Deviance682.34541.87Lower is better — Model B fits better.
AIC511.58488.68Lower AIC suggests Model B is preferred.
Null Deviance917.69917.69Same for both — baseline model.
Dispersion6.445.16Slightly lower in Model B — better variance explanation.

Comments

Popular posts from this blog

Analysis of Repeated Measures Data using SAS

Medical information for Melanoma, Merkel cell carcinoma and tumor mutation burden

Four essential statistical functions for simulation in SAS