Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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? – probabilityislogic Apr 5 '14 at 23:00
with no corrections it is : Estimate Std. Error z value Pr(>|z|) (Intercept) -2.80805 0.45605 -6.157 7.40e-10 *** – Pasato Apr 6 '14 at 7:23

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).

share|improve this answer
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. – Pasato Apr 6 '14 at 7:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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