title: ggplot2 geom_smooth() in R... loess, gam, splines, etc
body: <p>Hi I'm looking for some clarification here.</p>
  
  <p><em>Context</em>: I want to draw a line in a scatterplot that doesn't appear parametric, therefore I am using geom_smooth() in a ggplot. It automatically returns <code>geom_smooth: method="auto" and size of largest group is &gt;=1000, so using gam with formula: y ~ s(x, bs = "cs"). Use 'method = x' to change the smoothing method.</code> I gather gam stands for generalized additive models and it has a cubic spline used.</p>
  
  <p>Are the following perceptions correct?</p>
  
  <p>-Loess estimates the response at specific values. </p>
  
  <p>-Splines are approximations that connect different piecewise functions that fit the data (which make up the generalized additive model), and cubic splines are the specific type of spline used here.</p>
  
  <p>Lastly, When should splines be used, when should loess be used?</p>