# Interpreting a binned residual plot in logistic regression

I am carrying out a logistic regression with $24$ independent variables and $123,996$ observations. I am evaluating the model fit in order to determine if the data meet the model assumptions and have produced the following binned residual plot using the arm R package: Obviously there are some bad signs in this plot: many points fall outside the confidence bands and there is a distinctive pattern to the residuals. My question is - can I attach these issues to specific assumptions of the logistic regression model? For instance, can I say that there is evidence of non-linearity in the independent variables or of heteroscedasticity? If not, are there other diagnostics I can produce to help identify where the problem lies?

Based on Daniel's answer, it appears that the main issue is I was using residuals on the logit scale but expected values on the response scale. If I reproduce the plot with the residuals also on the response scale it looks like this: which is much more believable.

• Please describe the statistical theory that implies that such a residual plot is useful. May 21, 2014 at 19:16
• @FrankHarrell See discussion of Figure 17 in Gelman et al (2000) "Diagnostic checks for discrete data regression models using posterior predictive simulations" - available here: stat.columbia.edu/~gelman/research/published/dogs.pdf. Also page 97 of Andrew Gelman and Jennifer Hill, Data Analysis Using Regression and Multilevel/Hierarchical Models, Cambridge University Press May 21, 2014 at 19:39
• Can you summarize what exactly you are attempted to do with such plots? For binary logistic regression there is no distributional assumption, and for regression assumptions it's best to just fit the model flexibly (regression splines, etc.) or to use traditional partial residual plots. May 21, 2014 at 21:57
• @FrankHarrell I've edited the question to clarify that I'm trying to assess whether the data meet the model assumptions. Thanks for the introduction to partial residual plots, I think these are exactly what I'm looking for. May 22, 2014 at 8:25
• Could you show the code used to produce each plot so that we can see what you changed between the two plots? Jul 16, 2020 at 14:42