Draw a residual as a segment from a prediction to an observation
Source:R/geom-resid.R
GeomResid.RdThe segment is drawn from what the model predicts to what was observed, so
x/y is the observation and xend/yend the prediction until the moment
of drawing. Which of the two ends arrives says which axis the residual is
measured on. Pair it with StatResid in a ggplot2::layer() to draw
residuals in a plot you are assembling yourself.
Format
A ggplot2::Geom object.
See also
gf_resid(), which pairs this geom and StatResid for you.