title: Bonferroni Simultaneous Confidence Intervals of differences in means
body: <p>I am trying to obtain Bonferroni simultaneous confidence intervals in R. I have the following data set that I made up for practice:</p>
  
  <pre><code>df2 &lt;- read.table(textConnection(
    'group value
    1 25 
    2 36
    3 42
    4 50
    1 27
    2 35
    3 49
    4 57
    1 22
    2 37
    3 45
    4 51'), header = TRUE)
  </code></pre>
  
  <p>I have tried</p>
  
  <pre><code>aov(formula = value ~ group, data = df2)
  </code></pre>
  
  <p>However, this doesn't output simultaneous confidence intervals. Using SAS, the calculations should come out as:</p>
  
  <p><a href="https://i.stack.imgur.com/jEMF5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jEMF5.png" alt="enter image description here"></a></p>