Deviance Chi-Squared Test

The deviance \(\chi^2\) value is,

\[D = 2 \sum_{i=1}^{g}\left[y_i \ln\left(\frac{y_i}{n_i \hat{\pi}_i}\right)+(n_i-y_i) \ln\left(\frac{n_i-y_i}{n_i (1 - \hat{\pi}_i)}\right)\right]\]

where \(g\) is the number of replicate groups in the design, \(n_i\) is the number of runs, \(y_i\) is the number of successes (1s), and \(\hat{\pi}_i\) is the predicted probability in the \(i^{th}\) replicate group.

The degrees of freedom for the test is the number of replicate groups minus the number of parameters \(p\) in the model, \(df = g - p\).

There is evidence of poor fit if the \(\chi^2\) value per degree of freedom, \(D/df = D/(g-p)\), differs significantly from 1 or the p-value is less than the \(\alpha\)-risk.

If the design contains few replicates use the Hosmer-Lemeshow test instead.

References

  • Douglas C. Montgomery, Peck, Elizabeth A., and G. Geoffrey Vining. Introduction to Linear Regression Analysis. Wiley, 5th edition, 2012.