title: parametric ANOVA with unequal variances
body: <p>I was wondering if there is a way in R to do an ANOVA with unequal variances?</p>
  
  <p>Imagine the following example:</p>
  
  <pre><code>x &lt;- c(10,11,15,8,16,12,20)
  y &lt;- c(10,14,18,25,28,30,35)
  
  d &lt;- c(x,y)
  f &lt;- as.factor(c(rep("a",7), rep("b",7)))
  
  # Unequal variance:
  
  t.test(x,y)$p.value
  t.test(d~f)$p.value
  
  # Equal variance:
  
  t.test(x,y, var.equal=TRUE)$p.value
  t.test(d~f, var.equal=TRUE)$p.value
  
  anova(lm(d~f))[[5]]
  summary(aov(lm(d~f)))[[1]][5]
  summary(lm(d~f))[[4]][8]
  </code></pre>
  
  <p>As you can see from this example the different ways of performing an ANOVA in R, in case of two groups only, always result in a p-value identical to the one obtained by a t.test with equal variances. Again, is there a way to perform an ANOVA with unequal variances?</p>