Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2020 Jun;76(2):549-560.
doi: 10.1111/biom.13249. Epub 2020 Apr 6.

Assessing the goodness of fit of logistic regression models in large samples: A modification of the Hosmer-Lemeshow test

Affiliations

Assessing the goodness of fit of logistic regression models in large samples: A modification of the Hosmer-Lemeshow test

Giovanni Nattino et al. Biometrics. 2020 Jun.

Abstract

Evaluating the goodness of fit of logistic regression models is crucial to ensure the accuracy of the estimated probabilities. Unfortunately, such evaluation is problematic in large samples. Because the power of traditional goodness of fit tests increases with the sample size, practically irrelevant discrepancies between estimated and true probabilities are increasingly likely to cause the rejection of the hypothesis of perfect fit in larger and larger samples. This phenomenon has been widely documented for popular goodness of fit tests, such as the Hosmer-Lemeshow test. To address this limitation, we propose a modification of the Hosmer-Lemeshow approach. By standardizing the noncentrality parameter that characterizes the alternative distribution of the Hosmer-Lemeshow statistic, we introduce a parameter that measures the goodness of fit of a model but does not depend on the sample size. We provide the methodology to estimate this parameter and construct confidence intervals for it. Finally, we propose a formal statistical test to rigorously assess whether the fit of a model, albeit not perfect, is acceptable for practical purposes. The proposed method is compared in a simulation study with a competing modification of the Hosmer-Lemeshow test, based on repeated subsampling. We provide a step-by-step illustration of our method using a model for postneonatal mortality developed in a large cohort of more than 300 000 observations.

Keywords: Hosmer-Lemeshow test; calibration; goodness of fit; large samples; logistic regression; noncentrality parameter.

PubMed Disclaimer

Comment in

Similar articles

Cited by

References

REFERENCES

    1. Archer, K.J., Lemeshow, S. and Hosmer, D.W. (2007) Goodness-of-fit tests for logistic regression models when data are collected using a complex sampling design. Computational Statistics & Data Analysis, 51(9), 4450-4464.
    1. Austin, P.C. and Steyerberg, E.W. (2014) Graphical assessment of internal and external calibration of logistic regression models by using loess smoothers. Statistics in Medicine, 33(3), 517-535.
    1. Browne, M.W. and Cudeck, R. (1992) Alternative ways of assessing model fit. Sociological Methods & Research, 21(2), 230-258.
    1. Casella, G. and Berger, R.L. (2002) Statistical Inference. Pacific Grove, CA: Thomson Learning.
    1. Dahiya, R.C. and Gurland, J. (1973) How many classes in the Pearson chi-square test? Journal of the American Statistical Association, 68(343), 707-712.

LinkOut - more resources