I have 3 vectors which are unequal in size (lengths: 21, 33 and 7). Each vector contains ratio of bug-to-duplicate bugs in 3 different time periods. I have to find whether there is a difference between the 3 groups.

I cannot use one-way ANOVA since the groups have unequal sample sizes and unequal variances. I cannot use TukeyHSD because of unequal variances. Is Dunnett's modified Tukey Kramer test the only test available for such a kind of data? If, so how to interpret the results of that test since the Dunnett's test in R does not provide a p-value?

Is chi-squared test applicable to this data?


  • $\begingroup$ it sounds like chi-square... I don't see how length has a ratio. I'm guessing you can interpret these as count data somehow. Please detail the data better. $\endgroup$
    – John
    Feb 27, 2012 at 3:20
  • $\begingroup$ Hi John, I am comparing the ratio of # of bugs to # of duplicate bugs per month in Mozilla project from Nov06 to Oct11. I had to split this into 3 groups based on months before and after release of Firefox 3 and months after release of Firefox 4. Hence I get 3 groups with lengths mentioned in the question. $\endgroup$ Feb 27, 2012 at 4:43
  • $\begingroup$ So what are your 21 points in the first vector - is it 21 numbers, each of them between zero and one? $\endgroup$ Feb 27, 2012 at 6:02
  • $\begingroup$ your response in no way further clarifies what the data are... how is a vector of 21 numbers a ratio? $\endgroup$
    – John
    Feb 27, 2012 at 6:47
  • $\begingroup$ Here is the data set that I am working on dl.dropbox.com/u/6967747/ratio.csv $\endgroup$ Feb 27, 2012 at 19:30

2 Answers 2


From the sounds of it, you are comparing mean levels of outcome in 3 different groups. Linear regression will do this, and if you want robustness against different variances in the different groups, robust estimates of standard error can be used to take care of this.

Here's some R code that generates some example data, does the linear regression, computes robust standard errors, and performs a test that all three group means are equal

# generate the data
y1 <- rnorm(21, mean=3, sd=3)
y2 <- rnorm(33, mean=2, sd=3.5)
y3 <- rnorm(7, mean=4, sd=2.4)
y <- c(y1, y2, y3)
group <- factor(rep(1:3, times=c(21,33,7)))

# do the regression
lm1 <- lm(y~group)

# perform the test, using robust standard errors
library("sandwich") # you may need to install these packages

waldtest(lm1, vcov=vcovHC(lm1) )

If the variance doesn't differ very much between groups, you'll probably be fine without the robust standard errors.

  • 2
    $\begingroup$ Isn't the issue that each data point is a ratio? so they can't be normally distributed with eg mean 3, sd3. $\endgroup$ Feb 27, 2012 at 5:44
  • $\begingroup$ the Normality of the data in the code isn't an assumption in the analysis, it's just a way of generating random variables. I put in difference variances because the questioner mentioned them. With the use of robust standard errors, we don't need assumptions of Normality, or constant variance. $\endgroup$
    – guest
    Feb 27, 2012 at 6:18
  • $\begingroup$ Thanks for the info guys... This is the dataset that I am working on dl.dropbox.com/u/6967747/ratio.csv . There are 3 periods (PreBreakpad, PostBreakpad, PostRapid) and I have to find whether the ratio differs between the groups. $\endgroup$ Feb 27, 2012 at 19:49
  • $\begingroup$ Yes, now I understand the data I think this method will work fine. $\endgroup$ Feb 27, 2012 at 20:05
  • $\begingroup$ Hi Peter, Do you mean "guest"'s method works fine for this data set? $\endgroup$ Feb 27, 2012 at 20:10

'Robust' bootstrap methods with trimmed means? See

Wilcox, R. R. (2010). Fundamentals of Modern Statistical Methods: Substantially Improving Power and Accuracy, 2nd Edition. New York: Springer

Code can be found in Wilcox's R package WRS2 (on CRAN).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.