How to analyse such type of residuals?
-
3$\begingroup$ Would you mind provide some context? $\endgroup$– User1865345Commented Dec 29, 2022 at 16:28
-
$\begingroup$ Classification not regression is the approach to go with here. $\endgroup$– Estimate the estimatorsCommented Dec 29, 2022 at 17:33
-
1$\begingroup$ @Learning You seem to be advocating changing the question. Although regression and classification have much in common, they answer different questions. $\endgroup$– whuber ♦Commented Dec 29, 2022 at 21:20
1 Answer
On the face of it, you have fitted a regression with a single binary predictor. Let's suppose its values are 0 and 1, but the same story applies with different values.
So, there are two distinct fitted values, say the means for predictor = 0 and for predictor = 1, and they define precisely two vertical stripes on this plot.
There is nothing problematic about this plot, except that you cannot learn much from it. However, your fitted values are about 0.5 apart and your residuals are quite large by comparison with that difference.
Here's one such produced in my usual software.
It seems that your response variable has integer values, perhaps repeated many times. In that respect, my example is similar, although the regular spacing is more evident in your question.
-
3$\begingroup$ +1. But there's more to the story: the OP's data are discrete and thereby the plotting points mask one another. These plots are best rendered with a little jittering and some semi-transparency to reveal the distributions of the residuals. $\endgroup$– whuber ♦Commented Dec 29, 2022 at 17:08
-
1$\begingroup$ Cf. "perhaps repeated many times". In fact, virtually any other display of the two residual distributions, say a histogram or quantile plot, will reveal more than this plot. $\endgroup$– Nick CoxCommented Dec 29, 2022 at 17:10