# How to interpret this Residuals vs Fitted plot for multiple regression?

I'm quite new at linear regression. I get the following Residuals vs Fitted plot with parallel straight lines: I do not understand why there are two parallel lines. Is there a problem with my data?

Thx !

• Your response variable is binary (0/1 or any two other distinct values), right? – Glen_b Jul 8 '16 at 11:29
• Yes it is a binary response (0/1) and there are some NA – qaomia Jul 8 '16 at 12:05

1. Your original data consist of a pair of parallel lines!

Something like this: The red line indicates the least squares linear fit for this one-predictor case.

2. You then subtract the linear fit in red from the data laying on that pair of parallel lines to get a downsloping pair of lines in the residuals (calculating residuals from fitted is a skew transformation of the plot vs x, and making it vs fitted simply rescales the x-axis: If you have multiple predictors the plot would not look "neat" like this (with two clean lines), though. Are you certain you fitted multiple regression in your display?

A linear fit is generally not suitable for such data since the fitted line goes outside 0-1 (see where with my data the line crosses to above the data at about x=4?). More commonly a model that predicts the probability that the response is 1 would be used, such as logistic regression.

You may find the discussion of the model you fitted with the one I just mentioned at this post of some additional value.

• Thx for your answer. I will perform logistic regression then. What would be your suggestion for the NA values ? I don't like using na.omit because I lose 800 rows out of 2400. But I don't want NA to interfer with my model. – qaomia Jul 8 '16 at 12:41
• Should probably be a new question, but -- what do your NA values actually indicate? Are they in the response or the predictor? What would cause them? – Glen_b Jul 8 '16 at 12:54
• They are in the predictors : some data are simply missing and some data are estimated but the fiability of the estimation was low so I prefered to put NAs instead. – qaomia Jul 8 '16 at 13:01
• How are you estimating these? When you say 'fiability" what do you mean? If you mean 'viability' what makes an estimate viable? What would the proportion of data be if you hadn't filled any in? When you say "some are simply missing" is the tendency to missingness likely to be related to either the x or the y? – Glen_b Jul 8 '16 at 13:21
• My data are characteristics of houses. For example one estimated predictor is the year of construction of theses houses. To estimate it, I've used open data by knowing the location and the surface of my houses. In this case, my viability indicator is the difference of surface between my house and the one from the open data source. For some rows, the difference was over 1000 squared meters so I think it is irrelevant and I put NAs. This is totally arbitrary. My response y is totally filled by either 0 or 1. – qaomia Jul 8 '16 at 13:28