我试图比较四组的差异 . 我需要知道哪些差异显着不同 . 我不确定如何在所有组之间设置成对方差比较,然后使用p.adjust ='fdr'调整p值 .

我试过这样的东西,但似乎不起作用......

# define function

my.fligner.test=function(df){
       my.fligner.test.results=fligner.test(magnitude~cycle,data=df) 

answer=data.frame(cycle=unique(df$cycle),
                my.stat=my.fligner.test.results$statistic,
                my.p.val=my.fligner.test.results$p.value)
return(answer)
}

# run tests

all.fligner.tests=with(myvariances,
                   by(myvariances, list(cycle),
                      function (x) my.fligner.test(x)))

# create a data frame...

all.fligner.tests=do.call(rbind, all.fligner.tests)

这是我的示例数据:https://www.dropbox.com/s/3rb9kdsx8aefxy6/myvariances.csv?dl=0

我非常感谢一个简单的解释 .