Statistics, Data Science, Analytics, Business Intelligence, Machine Learning.
log(1-fitted(model)) * (1-dat$y) * dat$n ) pchisq( q = binom_deviance, df = sum(dat$n) - length(model$coefficients), lower.tail = FALSE ) Because the p-value is huge, 0.9999, we fail to reject the null hypothesis that the model is a good fit. Diagnostics: Pearson Residuals To visually inspect a