page in progress..... wade through the dust and shavings if you are desperate... or wait until this looks nicer
SCRIPT (needs editing)
#ANOVA: one way : "Ho- there are no significant differences between 2 or more data sets; Ha - there are significant differencees"
#http://www.gardenersown.co.uk/Education/Lectures/R/anova.htm#anova_1 <- nice website
#read the data into a table
#prep data from regular form (columns = separate data sets) to the stacked form required for anova
objects()
names(panorama)
attach(panorama)
random
spanorama <- stack(panorama)
spanorama
summary(panorama)
aov.ex1 = aov(values ~ ind,data=spanorama) #do the analysis of variance
summary(aov.ex1) #show the summary table
print(model.tables(aov.ex1,"means"),digits=3) #report the means and the number of subjects/cell
boxplot(values ~ ind,data=spanorama) #graphical summary
#TUKEY HDS test : single step multiple comparison, do it after ANOVA
require(laercio)
anv <- aov(values ~ ind,data=spanorama)
anova(anv)
LTukey(anv,"trat")
#OR:
your.aov <- aov(values ~ ind,data=spanorama)
#DIFFERENT ANOVA MODELS:
# y~x1 -> y is explained by x1, a one way anova
# y~ x1 + x1 -> y is explained by x1 and x2, a 2 way anova
# y~ x1*x2 -> y is explained by x1, x2 and their interaction term
summary(your.aov)
TukeyHSD(your.aov)
# anderson- darling test for normality in package "NORTEST"
# x a numeric vector of data values, the number of which must be greater than 7. Missing values are allowed.
ad.test(x)
ad.test(panorama$poison)
# to plot the posthoc labels on the boxplot ??? use photoshop