What is the red solid line in the “residuals vs leverage” plot produced by `plot.lm()`?
问题 fit <- lm(dist ~ speed, cars) plot(fit, which = 5) What does the solid red line in the middle of plot mean? I think it is not about cook's distance. 回答1: It is the LOESS regression line (with span = 2/3 and degree = 2 ), by smoothing standardised residuals against leverage. Internally in plot.lm() , variable xx is leverage, while rsp is Pearson residuals (i.e., standardised residuals). Then, the scattered plot as well as the red solid line is drawn via: graphics::panel.smooth(xx, rsp) Here is