title: How to get the confidence intervals for LOWESS fit using R?
body: <p>I didn't find any satisfactory answer to the confidence intervals (CIs) for LOWESS regression line of the 'stats' package of R:</p>
  
  <pre><code>plot(cars, main = "lowess(cars)")
  lines(lowess(cars), col = 2)
  </code></pre>
  
  <p>But I'm unsure how to draw a 95% CI around it?? However, I know I could get the estimated variance from</p>
  
  <pre><code>V = s^2*sum(w^2)
  </code></pre>
  
  <p>where, s2= estimated error variance, and w=weights applied to the X. Therefore, the 95% CIs should be</p>
  
  <pre><code>Y plus/minus 2*sqrt(V(Y))
  </code></pre>
  
  <p>I know there's a way of getting the CIs from loess fit, but I'd rather prefer LOWESS because it is robust. Thanks for your suggestions.</p>