示例数据,其中年龄为分类变量
在R里使用不同的统计检验结果是矛盾的。查了一些资料说主要原因有:p值在临界值、多重检验调整p值、数据偏态、总体与部分数据的差异等等。
有什么办法能确定具体是啥原因吗?谢谢!
运算过程:
kruskal.test和Steel.Dwass test结论是一致的,但是和Games Howell test不一致:
kruskal.test(t$DRBC, t$age)
Kruskal-Wallis rank sum test
data: t$DRBC and t$age
Kruskal-Wallis chi-squared = 11.815, df = 4, p-value = **0.01878**
Steel.Dwass(t$DRBC, t$age)
t p
age19-29:age30-39 0.89132807 0.90022744
age19-29:age40-49 1.99723449 0.26723721
age19-29:age50-59 0.71004365 0.95428742
age19-29:age60 3.15874344 **0.01372707**
age30-39:age40-49 1.41879018 0.61547794
age30-39:age50-59 0.05580002 0.99999781
age30-39:age60 2.64134115 0.06311223
age40-49:age50-59 1.09656732 0.80841451
age40-49:age60 1.39018901 0.63399675
age50-59:age60 2.07998512 0.22869963
games_howell_test(t, DRBC ~ age)
`# A tibble: 10 × 8
.y. group1 group2 estimate conf.low conf.high p.adj p.adj.signif
- <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <chr>
1 DRBC age19-29 age30-39 0.566 -0.390 1.52 0.485 ns
2 DRBC age19-29 age40-49 0.898 -0.166 1.96 0.144 ns
3 DRBC age19-29 age50-59 0.516 -0.719 1.75 0.783 ns
4 DRBC age19-29 age60 1.05 -0.106 2.20 0.095 ns
5 DRBC age30-39 age40-49 0.332 -0.650 1.31 0.887 ns
6 DRBC age30-39 age50-59 -0.0506 -1.22 1.11 1 ns
7 DRBC age30-39 age60 0.482 -0.597 1.56 0.737 ns
8 DRBC age40-49 age50-59 -0.383 -1.64 0.873 0.92 ns
9 DRBC age40-49 age60 0.150 -1.03 1.33 0.997 ns
10 DRBC age50-59 age60 0.533 -0.799 1.86 0.808 ns`
kruskal.test和Steel.Dwass test结论不一致,但是和Games Howell test一致:
kruskal.test(t$TMUCS, t$age)
Kruskal-Wallis rank sum test
data: t$TMUCS and t$age
Kruskal-Wallis chi-squared = 10.562, df = 4, p-value = **0.03196**
Steel.Dwass(t$TMUCS, t$age)
t p
age19-29:age30-39 1.3107040 0.68455616
age19-29:age40-49 1.5004746 0.56213885
age19-29:age50-59 1.6625569 0.45734527
age19-29:age60 1.2755493 0.70632438
age30-39:age40-49 0.2473029 0.99917636
age30-39:age50-59 0.7058386 0.95524110
age30-39:age60 2.4748591 0.09634190
age40-49:age50-59 0.4822325 0.98899772
age40-49:age60 2.6623200 0.05969303
age50-59:age60 2.5950051 0.07123948
games_howell_test(t, TMUCS ~ age)
`# A tibble: 10 × 8
.y. group1 group2 estimate conf.low conf.high p.adj p.adj.signif
- <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <chr>
1 TMUCS age19-29 age30-39 13.5 -7.99 34.9 0.424 ns
2 TMUCS age19-29 age40-49 12.2 -11.0 35.4 0.604 ns
3 TMUCS age19-29 age50-59 23.1 -6.09 52.4 0.194 ns
4 TMUCS age19-29 age60 -11.2 -36.9 14.6 0.758 ns
5 TMUCS age30-39 age40-49 -1.27 -21.4 18.9 1 ns
6 TMUCS age30-39 age50-59 9.68 -17.2 36.6 0.861 ns
7 TMUCS age30-39 age60 -24.6 -47.7 -1.54 0.03 *
8 TMUCS age40-49 age50-59 11.0 -17.4 39.3 0.827 ns
9 TMUCS age40-49 age60 -23.4 -48.1 1.36 0.074 ns
10 TMUCS age50-59 age60 -34.3 -64.8 -3.87 0.018 * `