View source: R/metrics_hoslem.R
metrics_hoslem | R Documentation |
Internal, not usually called directly
metrics_hoslem(y, yhat, g = 10, digits = c(2, 3))
y |
Observed y, usually of the form |
yhat |
Predicted y_hat, usually for the form |
g |
Number of bins to calculate quantiles. |
digits |
Number of decimal places of form |
Character string of chi-sq result, df, and p-value. Significant p-value suggests poor fit.
Adapted from Peter Solymos.
https://github.com/psolymos/ResourceSelection/blob/master/R/hoslem.test.R
fit = glm(mort_5yr~age.factor+extent.factor, data=colon_s, family="binomial")
metrics_hoslem(fit$y, fit$fitted)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.