title: Plot confidence interval efficiently
body: <p>I want to plot confidence intervals for some estimates after running a regression model.</p>
  
  <p>As I'm working with a very big dataset, I need an efficient solution: in particular, a solution that does not require me to <code>sort</code> or <code>save</code> the dataset. In the following example, I plot estimates for <code>b1</code> to <code>b6</code>:</p>
  
  <pre><code>reg y b1 b2 b3 b4 b5 b6
  
  foreach i of numlist 1/6 {
     local mean `mean'  `=_b[b`i']' `i'   
     local ci `ci' ///
      (scatteri ///
      `=_b[b`i'] +1.96*_se[b`i']' `i' ///
      `=_b[`i'] -1.96 * _se[b`i']' `i' ///
      ,lpattern(shortdash) lcolor(navy)) 
  } 
  twoway `ci' (scatteri `mean', mcolor(navy)), legend(off) yline(0) 
  </code></pre>
  
  <p>While <code>scatteri</code> efficiently plots the estimates, I can't get boundaries for the confidence interval similar to <code>rcap</code>.</p>
  
  <p>Is there a better way to do this?</p>