title: Fast Wald confidence intervals for a glm with broom in R
body: <p>I would like to calculate Wald confidence intervals of the coefficients of a glm on a somewhat large data set, and use <code>broom</code> for a tidy output.</p>
  
  <pre><code>mydata &lt;- data.frame(y = rbinom(1e5,1,0.8), 
                   x1 = rnorm(1e5), 
                   x2 = rnorm(1e5))
  glm.1 &lt;- glm(y ~ x1 + x2, data = mydata, family = "binomial")
  </code></pre>
  
  <p>Using <code>broom::tidy</code> takes a lot of time on large data, since it uses <code>confint.glm</code>, which calculates the confidence intervals based on the profiled log-likelihood function.  </p>
  
  <pre><code>tidy(glm.1, conf.int = TRUE) # can take literally hours
  </code></pre>