Reputation: 65
I am trying to analyse and present the results of Gastropod abundance vs. height on the shore and species in a Two-Way ANOVA.
This is the dataset http://dropcanvas.com/ercb6
The data has been sqrt transformed and an ANOVA test was successful. In my sample code below I was able to make an interaction plot of the normal Gastropod data. However, I want to make an interaction plot using the transformed data but I do not know how to alter the code to allow this. Suggestions?
Gastropods = read.csv(file = "MaroubraZones.csv", header = TRUE)
boxplot(Abundance ~ Zone*Species,data = Gastropods, names = c("A.high", "A.mid", "A.low", "C.high", "C.mid", "C.low", "N.high", "N.mid", "N.low"))
Gastropods.ANOVA = aov(Abundance ~ Zone * Species, data = Gastropods)
hist(Gastropods.ANOVA$residuals)
plot(Gastropods.ANOVA)
summary(Gastropods.ANOVA)
Gastropods$sqrtAbundance = sqrt(Gastropods$Abundance +1)
Gastropods.aov = aov(Gastropods$sqrtAbundance ~ Zone + Species + Zone:Species, data = Gastropods)
summary(Gastropods.aov)
interaction.plot(Gastropods$Zone, Gastropods$Species, Gastropods$Abundance, main= "Gastropod Interaction Plot", xlab = "Gastropod Zone", ylab= "Mean of Gastropod Abundance", legend = TRUE)
Upvotes: 0
Views: 329
Reputation: 5152
Just to close the question:
interaction.plot(Gastropods$Zone, Gastropods$Species, Gastropods$sqrtAbundance, main= "Gastropod Interaction Plot", xlab = "Gastropod Zone", ylab= "Mean of SQRT Gastropod Abundance", legend = TRUE)
Upvotes: 1