0

I have data of the following format from several org (showing a to d here, some have 3 and some have 4 samples):

org unfiltered  filtered
org_a   50.82   67.82
org_a   57.72   58.31
org_a   67.82   55.72
org_a   58.31   52.72
org_b   55.72   57.72
org_b   52.72   51.82
org_b   57.72   52.72
org_c   51.82   63.82
org_c   52.72   66
org_c   63.82   61
org_d   66      62
org_d   61      63
org_d   62      64
org_d   63      62

I have calculated mean (AVERAGE function in excel) for each org and then standard error (STDEV.S/SQRT(COUNT(sample1:sample4)) function in excel) by transposing the data manually.

I could see the differences between different org in the unfiltered plot and filtered plot. I am thinking of applying unpaired t-test to get p-values to show the statistical differences between different org for unfiltered and filtered data separately.

I have used the following code on the original data in R to compute different parameters but unable to go further to compute t-test.

summary(data)
aggregate(data[,2:3],by=list(org=data$org),FUN=mean)
aggregate(data[,2:3],by=list(org=data$org),FUN=sd)

dataMelt <- melt(as.data.frame(data)) 
g = ggplot(dataMelt)                         
g = g + geom_boxplot(aes(x=org,y=value)) 
g = g + facet_wrap(~variable)                
g 

box plot is not much helpful. I would also like to make barplots for filtered and unfiltered data showing standard error with p-values. Any guidance would be appreciated.

bio8
  • 176
  • 2
  • 15
  • @Roman: Thanks. The post link you shared does not show the original data format and solutions are hard to understand. And there is no information on plot. – bio8 Aug 05 '17 at 14:39
  • Solutions by [koshke](https://stackoverflow.com/a/9663332/322912), Vincent... are pretty straightforward. They also include a reproducible example. – Roman Luštrik Aug 05 '17 at 15:34
  • I did not find it helpful :P I have edited my question and described in more detail. I hope to get easily understandable inputs. – bio8 Aug 05 '17 at 22:16
  • I realized that I need to do 1-way ANOVA for filtered and unfiltered data separately (which I did), but how to create bar plot and keep p-value from ANOVA on the barplots. – bio8 Aug 07 '17 at 13:21
  • Please amend your question to reflect what you're after. Or even better yet, search stackoverflow on how to plot text on top of barplots. These questions have been answered many times before. – Roman Luštrik Aug 08 '17 at 07:31

0 Answers0