Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Can somebody explain to me the difference between linear model and loess model in statistics? I need to explain this to non-math people.

share|improve this question

2 Answers

A VERY non-technical answer

A simple linear model fits a straight line through a set of points. The line is the best possible straight line (at least, for one sensible definition of best)

A loess model fits a complicated curve through a set of points. In some ways, it can be thought of as a complicated moving average. It is the best possible curve (at least, for one sensible definition of best)

share|improve this answer
+1 Out of curiosity, just what is the "one sensible definition of best"? – whuber Mar 22 '12 at 20:58
It is the sum of squared errors, at least for simple regression. For loess, it's a weighted sum of squared errors. – Peter Flom Mar 22 '12 at 21:02
Note that a linear model can be used to fit curves by including polynomial or spline terms. The model is linear in the coefficients, not necessarily limited to a straight line relationship. – Greg Snow Mar 22 '12 at 21:30
I don't think Loess optimizes any criterion of "best," except when the range is 0, in which case the result is trivial: the Loess fit passes through all the points! – whuber Mar 23 '12 at 2:20

The loess.demo function in the TeachingDemos package for R will interactively demonstrate the ideas behind a loess fit. It will plot a set of data and the loess fit, then when you click on a point it will show the window used to fit at that point, the relative weights of the points within the window, and the "linear model" fit to that weighted data. Clicking on additional points will then update the display to show the general concept of the loess fit.

This may help explain what loess does and may help in an explanation of the difference.

share|improve this answer
how do you run loess.demo in R? – mike Mar 23 '12 at 13:17
@mike, first install R (if you have not already), run R and install the TeachingDemos package (exactly how depends on your system), load the package with library(TeachingDemos) then type ?loess.demo to bring up the help page to see how to run it, you can scroll to the bottom where the example are and copy and paste that code to R's command line to see the examples, then run with your own data to further explore. – Greg Snow Mar 23 '12 at 17:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.