I have a dataset with which I would like to compare the influence of species and habitat on the size of homerange - when using type III errors and pairwise comparisons within species and habitat.
Here is a subset of the data:
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))
I currently split the data into three species, then run separate ANOVA for each, but I think it makes sense to ask about the species and habitat at the same time as one ANOVA. Here is an example of ANOVA I for one view:
data.species.a<-subset(data1, species=="a") fit<-aov(homerange ~ habitat, data=data.species.a) summary(fit) TukeyHSD(fit)
aov () seems to be using type I. errors, which I find inappropriate; plus I believe that the Tukey test may be too conservative for pairwise comparisons. Can someone help me with an approach that allows me to run one ANOVA that takes into account both the influence of species and the habitat on the homerange, with type III errors, which also allows for less conservative pairing comparisons of species and habitat?