What does “least” mean in “Least Squares”?
library(animation) ani.options(interval = 0.3, ani.height = 450, ani.width = 600, title = "Demonstration of Least Squares (Slope)", description = "We want to find an estimate for the slope in 50 candidate slopes, so we just compute the RSS one by one. ") ani.start() par(mar = c(4, 4, 0.5, 0.1), mgp = c(2, 0.5, 0), tcl = -0.3) ## slope changing least.squares() ani.stop() ## or with intercept changing ani.options(interval = 0.3, ani.height = 450, ani.width = 600, title = "Demonstration of Least Squares (Intercept)", description = "We want to find an estimate for the intercept in 50 candidate intercetps, so we just compute the RSS one by one. ") ani.start() par(mar = c(4, 4, 0.5, 0.1), mgp = c(2, 0.5, 0), tcl = -0.3) # slope changing least.squares(ani.type = "intercept") ani.stop()