Other bivariate smoothers
Loess is one of a number of smoothers (including linear regression as an end-member) that can be used. The different smoothers vary in the assumptions they make about
The other scatter diagram smoothers include a straight, or "least-squares" line, a low-order polynomial least-squares line, and the "smoothing spline". Each can be viewed as special cases of the more flexible loess-type smoothers in which the curve is very simple. The best way to understand these different smoothers is to compare them:
Least-squares line
attach(ortann)
plot(tann ~ elevation)
abline(lm(tann ~ elevation), col="red")
Least-squares polynomial
# second order polynomial
poly2.model <- lm(tann ~ elevation+ I(elevation^2))
poly2.model
poly2.hat <- predict(poly2.model)
lines(elevation[order(elevation)], poly2.hat[order(elevation)],
col="purple")
Smoothing spline
spline.model <- smooth.spline(elevation, tann)
spline.model
lines(spline.model, col="green")