x1 <- c(3.6, 3.8, 3.7, 3.5) x2 <- c(4.3, 3.9, 4.2, 3.9, 4.4, 4.7) x3 <- c(4.2, 4.5, 4.0, 4.1, 4.5, 4.4) X <- c(x1, x2, x3) sum(X) X ID <- rep(c(1,2,3), c(4,6,6)) ID nazvy <- c('Delnik 1', 'Delnik 2', 'Delnik 3') rbind(X,ID) shapiro.test(X[ID==1])$p.val shapiro.test(X[ID==2])$p.val shapiro.test(X[ID==3])$p.val par(mfrow=c(1,3)) for(i in 1:3){ qqnorm(X[ID==i]) qqline(X[ID==i], col='red') mtext(nazvy[i], line=0.4, cex=0.8) } library(lawstat) levene.test(X, ID, location='mean') anova <- aov(X ~ factor(ID)) summary(anova) alpha <- 0.05 qf(1-alpha, 2, 13) source('AS-funkce.R') Sch <- Scheffe(X, ID, nazvy, alpha=0.05) 1*(Sch$L >= Sch$R) par(mfrow=c(1,1)) boxplot(X~ID, names=nazvy) points(c( mean(X[ID==1]), mean(X[ID==2]), mean(X[ID==3])), col='red', pch=19, cex=1.5) ST <- 326 SE <- 172 SA <- ST-SE SA fA <- 2 fE <- 15 SA/fA SE/fE qf(1-alpha, 2, 15) FA <- (SA/fA)/(SE/fE) 1-pf(FA, fA, fE) SE <- 3881 ST <- 7606 SA <- ST-SE SA 15+11+6+6