3

I want to statistically compare the mean values from eight different groups. I do not have the raw data, but have the sample size, mean and associated standard deviation and standard error. I was wondering if there was any code in R to do the ANOVA test on summary data, as well as the subsequent post-hoc, pair-wise comparisons.

n <- c(796,95,245,1645,701,1157,211,144)
means <- c(648,680,569,602,594,596,606,623)
sd <- c(146.3,90.5,61.2,98.9,113.6,106.8,87.8,76.9)


#Assigning the standard deviation and the sample size for each sample 
s.x <-146.3
n.x <-796
s.y <-90.5
n.y <-95
#Conducting the t-test with summary statistics
tsum.test(mean(648), s.x, n.x, mean(680), s.y, n.y)
user44690
  • 31
  • 1
  • 3
  • 2
    [This post](http://stats.stackexchange.com/questions/69842/anova-with-mean-sd-and-group-size?rq=1) points to the `rpsychi` package, which does at least some of what you want, with the `ind.oneway.second` function for the ANOVA. – Glen_b May 01 '14 at 17:08
  • Thanks for the help @Glen_b, I found the package 'BSDA' that has code to perform a t-test with the summary data. I am most interested in the pairwise comparisons between the means of all 8 groups, therefore, I am doing the 23 t-tests and using a Bonferroni correction (alpha/n) to adjust the p-value. Does this seem appropriate? – user44690 May 01 '14 at 19:05
  • I edited my original post to include the code that I am using to perform the multiple t-tests. – user44690 May 01 '14 at 19:14
  • 1
    This is not 'the' answer, however check the website http://statpages.info/anova1sm.html. – Muthu Palani Feb 18 '18 at 16:29
  • @MuthuPalani, that's a really neat tool, thanks a lot for providing the link! Does the tool on the page you provide do a Welch-t-test? It's hard to see from the description on the page – P.Weyh Oct 05 '21 at 06:59

0 Answers0