Skip to content

Instantly share code, notes, and snippets.

@sashaphanes
Created May 9, 2013 21:09
Show Gist options
  • Save sashaphanes/5550649 to your computer and use it in GitHub Desktop.
Save sashaphanes/5550649 to your computer and use it in GitHub Desktop.
#read combined data
setwd("/home/rosseraa/work.dir/allen.brain/")
raw.data = read.csv("common.regions.ANOVA.csv")
#run ANOVA
aov.result = aov(expression ~ region * species, data=raw.data)
summary(aov.result)
TukeyHSD(aov.result)
summary(aov.result)[[1]][["Pr(>F)"]]
print(model.tables(aov.result, "means"), digits=4)
#visualize
boxplot(expression ~ region * species, data=raw.data, pch=20, main="human & macaque", las=2, col=ifelse(raw.data$species == "macaque", "orange", "blue"), xlab="region", ylab="z-score")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment