Skip to content

Instantly share code, notes, and snippets.

@sashaphanes
Last active December 17, 2015 01:09
Show Gist options
  • Save sashaphanes/5526457 to your computer and use it in GitHub Desktop.
Save sashaphanes/5526457 to your computer and use it in GitHub Desktop.
#read macaque data
setwd("/home/rosseraa/work.dir/allen.brain/")
raw.data = read.csv("macaque.common.regions.ANOVA.csv")
#standardize expression values
raw.data$expression = scale(raw.data$expression)
#run ANOVA
aov.result = aov(expression ~ region, data=raw.data)
summary(aov.result) #is there a significant difference between any of the group means? If so, move onto a post-hoc test
TukeyHSD(aov.result) #post-hoc for multiple pairwise comparisons to see where the significant differences lie.
summary(aov.result)[[1]][["Pr(>F)"]] #p-values
print(model.tables(aov.result, "means"), digits=4)
boxplot(expression ~ region, data=raw.data, pch=20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment