# NOT RUN {
# Multiple regression with independent contrasts
# excluding the polar bear - grizzly bear contrast
data(GarlandJanis.IC)
lm(running.speed ~ body.mass + hind.l.length - 1,
subset=names.contr!="Tm-Ur", data= GarlandJanis.IC)
# }
# NOT RUN {
# This data set can be obtained from the original files as:
garland.janis.ic <- cbind(read.table("49ms.fic")[,c(3,4)],
read.table("49hmt.fic")[,c(3,4)])
branch.lengths <- read.table("49ms.fic")[,5]
garland.janis.ic <- garland.janis.ic/branch.lengths
names(garland.janis.ic) <- c("body.mass", "running.speed",
"hind.l.length", "mtf.ratio")
garland.janis.ic[garland.janis.ic$body.mass<0,] <-
-1 * garland.janis.ic[ garland.janis.ic$body.mass<0, ]
garland.janis.ic$branch.lengths <- branch.lengths
garland.janis.ic$names.contr <-
as.factor(read.table("49ms.fic")[,1])
garland.janis.ic$clade.contr <-
as.factor( c("root",rep("Carnivore",18), rep("Herbivore",29)))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab