x <- c(133, 134, 132, 141, 135, 135, 136, 137, 135, 137, 137, 136, 139, 118, 130) sum(x) shapiro.test(x) library(PASWR) SIGN.test(x, md=131, alternative='two.sided') sum((x-131)!=0) wilcox.test(x, mu=131, alternative='two.sided', correct=F, exact=F, conf.int=T) hist(x-131) boxplot(x) points(131, col='red', pch=20, cex=3) # 8.2 x <- c(0.280, 0.312, 0.280, 0.300, 0.365, 0.307, 0.320, 0.316, 0.242, 0.321, 0.337, 0.315, 0.342) sum(x) y <- c(0.280, 0.312, 0.288, 0.298, 0.361, 0.307, 0.319, 0.315, 0.242, 0.323, 0.339, 0.315, 0.359) sum(y) z <- x-y shapiro.test(z) SIGN.test(z, md=0, alternative='two.sided') sum((z-0)!=0) wilcox.test(z, mu=0, alternative='two.sided', correct=F, exact=F, conf.int=T) wilcox.test(x,y, paired=T, alternative='two.sided', correct=F, exact=F, conf.int=T) par(mfrow=c(1,2)) boxplot(x,y) boxplot(z) x <- c(133, 134, 132, 141, 135, 135, 136, 137, 135, 137, 137, 136, 139, 118, 130) sum(x) y <- c(132, 132, 133, 128, 149, 132, 137) sum(y) shapiro.test(x) shapiro.test(y) wilcox.test(x, y, alternative='two.sided', conf.level = 0.99, exact=F, correct=F, conf.int=T) boxplot(x,y) X1 <- c(420, 560, 600, 490, 550, 570, 340, 480, 510, 460) sum(X1) X2 <- c(400, 420, 580, 470, 470, 500, 520, 530) sum(X2) X3 <- c(450, 700, 630, 590, 420, 590, 610, 540, 740, 690, 540, 670) sum(X3) cit <- c(X1, X2, X3) cit znacka <- c(rep(1,10), rep(2,8), rep(3,12)) znacka kruskal.test(cit, znacka) alpha <- 0.05 r <- 3 qchisq(1-alpha, r-1) library(PMCMR) posthoc.kruskal.nemenyi.test(x=cit, g=znacka, methods='Chisquare') ls(posthoc.kruskal.nemenyi.test(x=cit, g=znacka, methods='Chisquare')) posthoc.kruskal.nemenyi.test(x=cit, g=znacka, methods='Chisquare')$p.val boxplot(X1, X2, X3)