English

A directional Hosmer-Lemeshow goodness-of-fit test for sparse logistic regression

Methodology 2026-07-16 v1 Applications

Abstract

Goodness-of-fit assessment for the binary logistic regression model is difficult when covariates are continuous: the data are effectively sparse, the classical Pearson and deviance tests fail, and practitioners rely on partition-based tests, such as the Hosmer-Lemeshow test, that group observations before comparing observed and expected counts. We study a partition test that modifies the Hosmer-Lemeshow statistic with a single directional correction term, weighted by (12πˉg)(1-2\bar\pi_g) and referred to a χG22\chi^2_{G-2} distribution. The correction is the grouped form of the Osius-Rojek/Farrington standardization; grouping makes it well defined in the sparse regime, and it targets the asymmetric over- and under-prediction that a misspecified link induces. A single alignment functional captures its effect, predicting where the test gains power (asymmetric-link misspecification) and where it does not (symmetric departures, and covariate-space structure that no probability-grouping test can see). In simulations the test holds its size; no well-calibrated partition test is more sensitive to asymmetric-link misfit, and it clearly exceeds Hosmer-Lemeshow there, most so for the complementary log-log link -- a modest gain that fades as nn grows; it ties Hosmer-Lemeshow on an omitted interaction and is less powerful on an omitted quadratic (by about ten percentage points at n=1000n=1000). A real-data application illustrates its use, and the test is implemented in the R package ebrahim.gof.

Keywords

Cite

@article{arxiv.2607.15454,
  title  = {A directional Hosmer-Lemeshow goodness-of-fit test for sparse logistic regression},
  author = {Ebrahim Khaled Ebrahim and Ahmed El-Kotory},
  journal= {arXiv preprint arXiv:2607.15454},
  year   = {2026}
}

Comments

29 pages, 8 figures. R package: ebrahim.gof (CRAN). Reproduction code and data: https://github.com/ebrahimkhaled/ebrahim-gof-paper ; Zenodo: https://doi.org/10.5281/zenodo.21184547