_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › 譴螳谿伎蟆

Contents

1 Wilcoxon rank sum test
2 Wilcoxon signed rank test
3 Mood Test
4 Kurskal-Wallis Test
5 median.test


觜覈 蟆企.

1 Wilcoxon rank sum test #

  • 讌 蠏覿螳 蟆曙 覃 谿 蟆
  • 蠏 覿 Cauchy 覿 螳 豺 覿襯 磯ゴ 蟆朱 螳
  • 豺煙 螳 誤 蟆曙一 豺 覿襯 螳讌 Wilcoxon signed rank test
  • 讌 覈 螳る
x1 <- c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46)
x2 <- c(1.15, 0.88, 0.90, 0.74, 1.21)

覈 螳?
> ks.test(x1, x2)

	Two-sample Kolmogorov-Smirnov test

data:  x1 and x2
D = 0.6, p-value = 0.1658
alternative hypothesis: two-sided

譴螳 螳?
> wilcox.test(x1, x2)

	Wilcoxon rank sum test

data:  x1 and x2
W = 35, p-value = 0.2544
alternative hypothesis: true location shift is not equal to 0

2 Wilcoxon signed rank test #

讌 Paired願, 蠏覿螳 蟆曙 覃 谿 蟆
> x1 <- c(1.83,  0.50,  1.62,  2.48, 1.68, 1.88, 1.55, 3.06, 1.30)
> x2 <- c(0.878, 0.647, 0.598, 2.05, 1.06, 1.29, 1.06, 3.14, 1.29)
> wilcox.test(x1, x2, paired=T)

	Wilcoxon signed rank test

data:  x1 and x2 
V = 40, p-value = 0.03906
alternative hypothesis: true location shift is not equal to 0 

3 Mood Test #

x1 <- c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46)
x2 <- c(1.15, 0.88, 0.90, 0.74, 1.21)
mood.test(x1, x2)

> mood.test(x1, x2)

	Mood two-sample test of scale

data:  x1 and x2
Z = 1.3827, p-value = 0.1668
alternative hypothesis: two.sided
蠏覓願 讌讌

4 Kurskal-Wallis Test #

  • れ 一危 螳 一危一 襯 覿
  • 觜覈 蟆

> kruskal.test(weight ~ group, data=datasets::PlantGrowth)
	Kruskal-Wallis rank sum test

data:  weight by group 
Kruskal-Wallis chi-squared = 7.9882, df = 2, p-value = 0.01842

    • 蠏覓願: 3蠏碁9 覃 螳.
    • 襴所: 3蠏碁9 覃 る.
  • p-value = 0.01842 企襦 谿願 .

> library("pgirmess")
> kruskalmc(weight ~ group, data=datasets::PlantGrowth)
Multiple comparison test after Kruskal-Wallis 
p.value: 0.05 
Comparisons
          obs.dif critical.dif difference
ctrl-trt1    4.40     9.425108      FALSE
ctrl-trt2    6.65     9.425108      FALSE
trt1-trt2   11.05     9.425108       TRUE

> levels(warpbreaks$wool)
[1] "A" "B"
> levels(warpbreaks$tension)
[1] "L" "M" "H"
> kruskal.test(breaks ~ wool*tension, data=warpbreaks)

	Kruskal-Wallis rank sum test

data:  breaks by wool by tension 
Kruskal-Wallis chi-squared = 1.3261, df = 1, p-value = 0.2495

    • 蠏覓願: 3蠏碁9 覃 螳.
    • 襴所: 3蠏碁9 覃 る.
  • p-value = 0.2495 企襦 谿願 .

5 median.test #

--豢豌: http://www.mail-archive.com/r-help@r-project.org/msg95278.html
median.test<-function(y1,y2){ 
  z<-c(y1,y2) 
  g <- rep(1:2, c(length(y1),length(y2))) 
  m<-median(z) 
  fisher.test(z<m,g)$p.value 
} 

median.test(x1, x2)
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:54

語 蟲レ. 語 螳 螳れ 谿曙朱 碁螻 給. (R.襦る)