Binned residual plots are achieved by "dividing the data into
categories (bins) based on their fitted values, and then plotting
the average residual versus the average fitted value for each bin."
(Gelman, Hill 2007: 97). If the model were true, one would
expect about 95% of the residuals to fall inside the error bounds.
If term
is not NULL
, one can compare the residuals in
relation to a specific model predictor. This may be helpful to check if a
term would fit better when transformed, e.g. a rising and falling pattern
of residuals along the x-axis is a signal to consider taking the logarithm
of the predictor (cf. Gelman and Hill 2007, pp. 97-98).