# Hosmer-Lemeshow goodness of fit tests.

### Description

The function computes Hosmer-Lemeshow goodness of fit tests for C and H statistic as well as the le Cessie-van Houwelingen-Copas-Hosmer unweighted sum of squares test for global goodness of fit.

### Usage

1 | ```
HLgof.test(fit, obs, ngr = 10, X, verbose = FALSE)
``` |

### Arguments

`fit` |
numeric vector with fitted probabilities. |

`obs` |
numeric vector with observed values. |

`ngr` |
number of groups for C and H statistic. |

`X` |
covariate(s) for le Cessie-van Houwelingen-Copas-Hosmer global goodness of fit test. |

`verbose` |
logical, print intermediate results. |

### Details

Hosmer-Lemeshow goodness of fit tests are computed; see Lemeshow and Hosmer (1982).

If `X`

is specified, the le Cessie-van Houwelingen-Copas-Hosmer
unweighted sum of squares test for global goodness of fit is additionally
determined; see Hosmer et al. (1997).
A more general version of this test is implemented in function
`residuals.lrm`

in package rms.

### Value

A list of test results.

### Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

### References

S. Lemeshow and D.W. Hosmer (1982). A review of goodness of fit statistics
for use in the development of logistic regression models.
*American Journal of Epidemiology, 115(1), 92-106.*

D.W. Hosmer, T. Hosmer, S. le Cessie, S. Lemeshow (1997). A comparison
of goodness-of-fit tests for the logistic regression model.
*Statistics in Medicine*, **16**, 965-980.

### See Also

`residuals.lrm`

### Examples

1 2 3 4 5 6 7 |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.