0

我在这里发现了一个类似的问题,但我认为我的问题是我是否正确解释了我的数据。

我做了简单的方差分析,发现在我的数据中我有很大的不同(p.value < 0.05:

an<-aov(Value ~ Group, data=mydata)

然后我做我的 TukeyHSD:

TukeyHSD(an)

我的输出看起来像这样:

Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = Value ~ Group, data = kwdata)

            diff         lwr        upr     p adj
X-A     -3.15668041  -8.0916672  1.7783064 0.6646288
C-A     -2.07921381  -5.0632490  0.9048214 0.5209910
D-A      0.54997509  -1.8916800  2.9916302 0.9999804
w-X      3.79964159  -3.6284972 11.2277804 0.9108728
D-C      2.62918890  -0.5801339  5.8385117 0.2473717

如果我理解正确,我的组与超过 0.0 的 lwr 值的组合是具有最大显着差异的组。这是正确的吗?

我不确定如何检测与 tukeyhsd 有显着差异的组。

这个输出距离实际输出只有几行。我的任务是分析多组并检测具有显着差异的组。

编辑:

现在一个完整的例子:

Value<- c(-0.9944999814033508,-0.35850000381469727,0.7063000202178955,-1.774399995803833,-1.080299973487854,0.30550000071525574,1.8499999046325684,-0.4124999940395355,0.5827999711036682,1.7506999969482422,-6.693999767303467,-0.8779000043869019,-1.3408000469207764,1.2560999393463135,-0.10040000081062317,1.8499999046325684,-0.3319000005722046,0.4957999885082245,0.8779000043869019,0.7387999892234802,0.8779000043869019,0.9154000282287598,0.8779000043869019,0.7063000202178955,-1.3408000469207764,0.7063000202178955,-0.3319000005722046,-1.6448999643325806,0.4124999940395355,-1.6448999643325806,-0.8779000043869019,0.7487000226974487,0.4399000108242035,1.8499999046325684,-1.6448999643325806,-2.4323999881744385,1.2265000343322754,-0.4957999885082245,-9.999899864196777,-1.7506999969482422,-1.6448999643325806,-9.999899864196777,0.8779000043869019,-5.06279993057251,0.8779000043869019,-2.9677000045776367,-5.06279993057251,-6.693999767303467,-1.0990500450134277,0.9944999814033508,-0.4677000045776367,-0.35850000381469727,-9.999899864196777,0.5827999711036682,0.7487000226974487,0.7387999892234802,-0.2533000111579895,-9.999899864196777,-1.0363999605178833,0.30550000071525574,-1.1749999523162842,-0.8064000010490417,-9.999899864196777,-0.9944999814033508,-2.478300094604492,-0.1509999930858612,0.4957999885082245,-4.571800231933594,-6.324900150299072,-0.38530001044273376,-1.3408000469207764,-5.93179988861084,-6.693999767303467,-2.9677000045776367,0.8779000043869019,-0.050200000405311584,-1.774399995803833,-0.1509999930858612,-0.23725003004074097,-0.6432999968528748,1.2560999393463135,-0.10040000081062317,0.4399000108242035,-0.7063000202178955,0.9154000282287598,-0.21819999814033508,1.2265000343322754,-0.4124999940395355,0.17640000581741333,-1.4758000373840332,-0.9944999814033508,-1.080299973487854,-0.6432999968528748,-9.999899864196777,-2.0536999702453613,-0.21819999814033508,0.7487000226974487,0.025100000202655792,-1.0363999605178833,-0.050200000405311584,-0.7387999892234802,0.4957999885082245,-1.4758000373840332,-0.7063000202178955,0.17640000581741333,-5.06279993057251,-0.6432999968528748,-1.4758000373840332,-0.9944999814033508,-0.2533000111579895,0.17640000581741333,-0.3319000005722046,0.6776500344276428,0.30550000071525574,-0.050200000405311584,0.5827999711036682,1.2560999393463135,-0.4957999885082245,-0.38530001044273376,0.9944999814033508,-2.4323999881744385,1.1263999938964844,-0.9944999814033508,1.7506999969482422,1.080299973487854,-0.7387999892234802,-1.3408000469207764,0.6128000020980835,-2.0536999702453613,0.7063000202178955,-0.8064000010490417,-0.8779000043869019,-0.050200000405311584,-2.9677000045776367,-0.8779000043869019,-2.0536999702453613,-1.3408000469207764,-1.3408000469207764,-0.38530001044273376,0.7063000202178955,-9.999899864196777,-0.4677000045776367,0.7721999883651733,0.025100000202655792,1.1263999938964844,-6.324900150299072,-0.1509999930858612,-0.4399000108242035,-0.9944999814033508,-0.9944999814033508,-0.4677000045776367,-1.0363999605178833,-1.7506999969482422,1.2265000343322754,-0.8779000043869019,0.6128000020980835,-0.050200000405311584,0.5827999711036682,-0.7063000202178955,-0.6432999968528748,-0.23725003004074097,0.025100000202655792,0.4124999940395355,0.7721999883651733,-1.0990500450134277)
Value<-c(Value,0.9944999814033508,-0.2533000111579895,1.2560999393463135,-0.21819999814033508,-1.1749999523162842,-0.38530001044273376,-0.4399000108242035,-0.7063000202178955,-2.478300094604492,-2.4323999881744385,0.9154000282287598,-0.23725003004074097,-0.38530001044273376,-1.6448999643325806,-0.050200000405311584,1.8499999046325684,-0.38530001044273376,-0.6432999968528748,-4.571800231933594,-6.693999767303467,-1.7506999969482422,1.080299973487854,0.4124999940395355,-1.3408000469207764,-5.93179988861084,-0.35850000381469727,-0.6432999968528748,-0.4124999940395355,-1.0990500450134277,-0.9944999814033508,-0.8064000010490417)
Group<-factor(c(rep('D',18),rep('C',1),rep('A',7),rep('B',34),rep('E',3),rep('F',4),rep('G',10),rep('H',2),rep('I',29),rep('J',16),rep('N',1),rep('M',1),rep('Z',2),rep('X',67),rep('O',1)))
mydata<-data.frame(Group, Value)
summary(aov(Value ~Group,mydata))
TukeyHSD(aov(Value ~Group))

我的问题是:

  1. 如何检测显着差异?使用 p adj 列,如果如何?
  2. (附加问题)我可以执行 Tukey 然后执行 pairwise.wilcoxon 并获得具有显着差异的组的切割集。这是统计数据中更稳健的方式吗?
4

1 回答 1

0

我认为您可以使用 dimnames 访问不同组的名称。

根据您的示例,测试第二组

tR <- TukeyHSD(aov(Value ~Group))

if( tR$Groups[2,4] < 0.05 ) {   
   paste("Group", dimnames(tR$Groups)[[1]][2] , "has a Probablity of" , tR$Groups[2, 4])
}
于 2015-12-03T18:48:37.803 回答