title: ggplot2: how to get robust confidence interval for predictions in geom_smooth?
body: <p>consider this simple example</p>
  
  <pre><code>dataframe &lt;- data_frame(x = c(1,2,3,4,5,6),
                          y = c(12,24,24,34,12,15))
  &gt; dataframe
  # A tibble: 6 x 2
        x     y
    &lt;dbl&gt; &lt;dbl&gt;
  1     1    12
  2     2    24
  3     3    24
  4     4    34
  5     5    12
  6     6    15    
  
  dataframe %&gt;% ggplot(., aes(x = x, y = y)) + 
  geom_point() + 
  geom_smooth(method = 'lm', formula = y~x)
  </code></pre>
  
  <p>Here the standard errors are computed with the default option. However, I would like to use the <strong>robust</strong> variance-covariance matrix available in the package <code>sandwich</code> and <code>lmtest</code></p>
  
  <p>That is, using <code>vcovHC(mymodel, "HC3")</code> </p>
  
  <p>Is there a way to get that in a simple way using the <code>geom_smooth()</code> function?</p>
  
  <p><a href="https://i.stack.imgur.com/S7PCL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S7PCL.png" alt="enter image description here"></a></p>