
Analysis of Covariance
相逢一醉为前缘
这个作者很懒,什么都没留下…
展开
-
Analysis of Covariance
regrowth <- read.table("c:\\temp\\ipomopsis.txt",header=T)attach(regrowth)names(regrowth)plot(Root,Fruit,pch=16,col=c("blue","red")[as.numeric(Grazing)])levels(Grazing)abline(lm(Fruit[Grazing=="Gra...翻译 2018-03-28 08:20:46 · 263 阅读 · 0 评论 -
12.4 Contrasts and the parameters of ANCOVA models
Ancovacontrasts <- read.table("c:\\temp\\Ancovacontrasts.txt",header=T)attach(Ancovacontrasts)names(Ancovacontrasts)lm(weight[sex=="male"]~age[sex=="male"])lm(weight~age,subset=(sex=="female"))lm(w...翻译 2018-03-28 10:45:59 · 292 阅读 · 0 评论 -
12.3 ANCOVA with two factors and one continuous covariate
Gain <- read.table("c:\\temp\\Gain.txt",header=T)attach(Gain)names(Gain)m1 <- lm(Weight~Sex*Age*Genotype)summary(m1)m2 <- step(m1)summary(m2)newGenotype <- Genotypelevels(newGenotype)level...翻译 2018-03-28 08:29:51 · 207 阅读 · 0 评论 -
12.5 Order matters in summary.aov
summary.aov(lm(weight~sex*age))summary.aov(lm(weight~age*sex))summary.aov(lm(Fruit~Grazing*Root))summary.aov(lm(Fruit~Root*Grazing))tapply(Root,Grazing, mean)summary(lm(Fruit~Root*Grazing))summary(lm(...翻译 2018-03-28 11:24:41 · 313 阅读 · 0 评论