我有一个数据集,我想用它来比较物种和栖息地对家庭范围大小的影响——同时在物种和栖息地内使用 III 型错误和成对比较。
这是数据的一个子集:
species<- c("a","b","c","c","b","c","b","b","a","b","c","c","a","a","b","b","a","a","b","c")
habitat<- c("x","x","x","y","y","y","x","x","y","z","y","y","z","z","x","x","y","y","z","z")
homerange<-c(6,5,7,8,9,4,3,5,6,9,3,6,6,7,8,9,5,6,7,8)
data1<-data.frame(cbind(species, habitat, homerange))
data1$homerange<-as.numeric(as.character(data1$homerange))
目前我正在拆分三个物种的数据,然后为每个物种运行单独的 ANOVA,但我相信使用一个 ANOVA 同时询问物种和栖息地更有意义。这是我为一个物种运行的 ANOVA 示例:
data.species.a<-subset(data1, species=="a")
fit<-aov(homerange ~ habitat, data=data.species.a)
summary(fit)
TukeyHSD(fit)
aov() 似乎使用 I 类错误。. . 我认为不合适;另外,我相信 Tukey 的测试对于成对比较来说可能过于保守。有人可以帮助我采用一种方法,让我运行一个 ANOVA,考虑物种和栖息地对家庭范围的影响,具有 III 型错误,还允许对物种和栖息地进行不太保守的成对比较?