- One factor ANOVA
- Git and GitHub
- Means tests in ANOVA
- Experimental Design
- Power analyses
- Multi-factor ANOVA
10/30/2018 & 11/01/2018
From Langford, D. J.,et al. 2006. Science 312: 1967-1970
In words:
stretching = intercept + treatment
- The model statement includes a response variable, a constant, and an explanatory variable.
- The only difference with regression is that here the explanatory variable is categorical.
RNAseq_Data <- read.table('RNAseq_lip.tsv', header=T, sep='\t')
g1 <- RNAseq_Data$Gene01
Pop <- RNAseq_Data$Population
boxplot(g1~Pop, col=c("blue","green"))
Or, to plot all points:
stripchart(g1~Pop, vertical=T, pch=19, col=c("blue","green"),
at=c(1.25,1.75), method="jitter", jitter=0.05)
Pop_Anova <- aov(g1 ~ Pop)
summary(Pop_Anova)
R, lm assumes that all effects are fixedlme instead (part of the nlme package)git clone https://github.com/wcresko/UO_ABS.git
git status git merge origin/master
dplyr functions.RNAseq_Data <- read.table("RNAseq.tsv", header=T, sep='')
x <- RNAseq_Data$categorical_var
y <- RNAseq_Data$continuous_var1
z <- RNAseq_Data$continuous_var2
contrasts(x) <- cbind(c(0, 1, 0, -1), c(2, -1, 0, -1), c(-1, -1, 3, -1))
round(crossprod(contrasts(x)), 2)
rnaseq_data_list <- list(x = list(‘xxx vs. xxx’ = 1, ‘xxx vs. xxx’ = 2, ‘xxx vs. xxx’ = 3))
RNAseq_aov_fixed <- aov(y ~ x) plot(RNAseq_aov_fixed) boxplot(y ~ x) summary(RNAseq_aov_fixed, split = rnaseq_data_list)
perc <- read.table('perchlorate_data.tsv', header=T, sep='\t')
x <- perc$Perchlorate_Level
y <- log10(perc$T4_Hormone_Level)
MyANOVA <- aov(y ~ x)
summary (MyANOVA)
boxplot(y ~ x)
install.packages("multcomp")
library(multcomp)
summary(glht(MyANOVA, linfct = mcp(x = "Tukey")))