I'm a complete rookie when it comes to logistic regression and I seem not to be quite aware of the concept of deviance residuals. Could anyone help me interpret this plot? As far as I know these residual values should fall along the intercept. std_deviance_residuals

All covariates are statistically significant.

  • 3
    $\begingroup$ This says you are trying to predict something rare. My take would be that you don't have enough good predictors of the "rare" cases. If you did there would likely be more points in the 0-2 range. Either that or there is a certain class of points that your model does poorly on. Is your estimated intercept large in magnitude? $\endgroup$ Apr 5, 2014 at 23:00
  • $\begingroup$ with no corrections it is : Estimate Std. Error z value Pr(>|z|) (Intercept) -2.80805 0.45605 -6.157 7.40e-10 *** $\endgroup$
    – Pasato
    Apr 6, 2014 at 7:23

1 Answer 1


Any of the various forms of residuals used in connection with GLMs (raw, Pearson, deviance, Anscombe and even working residuals) can be difficult to interpret visually.

However, broadly speaking, your deviance residuals should be expected to have mean close to 0 and nearly constant variance, when plotted against any predictor, or against fitted values, or even against their index (which usually isn't especially meaningful, unless it represents an ordering in the time the observation was collected or something, in which case it could be quite useful).

In this case, as near as I can discern, you have what looks like mean near 0 against Index.

It can be hard to see where the typical value is in the case of logistic regression (sometimes it may help to consider looking at a smooth of the values for that reason).

If you have not already done so, try plot(rf1).

  • $\begingroup$ Thank you :) I did plot my rf1 but apart from QQ none of these plots seems familiar to me. As you say, the 1/0 class is imbalanced (like 15/1). In the next step I'll try to apply the connection for the intercept as I assume the prevalance in entire population would be similiar to the one of the sample. I'd also try weighing my observations. I'll let you how it affects residuals' distribution. $\endgroup$
    – Pasato
    Apr 6, 2014 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.