Lecture 10 R Script - mlloyd23/bio211_JAN2018 GitHub Wiki
# MANOVA test
head(iris)
res.man <- manova(cbind()
summary()
#significant p value means we can conclude Species has an effect on sepal and
#petal length.
#How do we get individual p values for the effect of sepal length and petal
#lenth separately?
summary.aov()
boxplot()
boxplot()
#plot all data on one plot
head(iris)
library(reshape2)
iris2 <- melt()
head()
tail()
library(ggplot2)
ggplot()
#################################################################################
getwd()
setwd("C:/Users/Melanie/Desktop/biostats 2/My lectures")
stream.data<-read.table("streams2.txt", header=TRUE)
head(stream.data)
str(stream.data)
#Which of these factors affects number of longnose?
#we could plot each relationship...
plot()
plot()
#but we don't have time for that...
pairs()
#use forward and backward variable selection
model.null = lm()
model.full = lm()
step(model.null,
scope = list()
model.final = lm()
summary()