Since I got the same question twice, let us look at it quickly….
Some students show me a graph (from a Poisson regression) which looks
and they asked “isn’t it weird ?“, i.e.”residuals are null or positive… this is not what we should have, right ?“. Actually, residuals are always centered in a glm regression (if you keep the intercept). Let us generate a dataset,
we look carefully, residuals in the lower part, they are strictly
negative… And since, on average, we should have zero, then we are
very close to 0.
Actually, the true value is either
So what happens ? Here, the value of the parameter (the expected value of our Poisson distribution) is very small
crude estimator for the glm would be to consider a regression only on
the intercept. In that case, the error would be either 0-0.026, or
1-0.026, i.e. for 97.5%, we have -0.026 (which is small, close to 0,
but negative), while for 2.5% we have 0.974 (which is huge compared to
the previous value). Well, on that graph, we plot Pearson’s residuals, i..e. we divide the difference by the expected value… so we have those two curves….
Actually, there are only two clouds since the probability to have 1 (when lambda is close to 2.5%) is small, and extremely small to exceed 2…
On the graph below, the average value of Y increases (and then decreases): initially, almost all the points are on the red curve (i.e. we observe 0, and predict something extremely small), then we have more and more points on the blue
curve (for more and more individuals we have 1), then we start to see
some on the green curve (i.e. 2), etc. Note that areas where we observe
clouds remain unchanged (i.e. the colored curves).
So the graph is perfectly normal since we have a discrete distribution (while we predict something continuous).