[R] how to perform multiple comparison?
laomeng_3
laomeng_3 at 163.com
Fri May 20 13:51:35 CEST 2016
ok,many thanks.
发自 网易邮箱大师
On 2016-05-20 08:19 , Jim Lemon Wrote:
Hi laomeng_3,
Have a look at the padjust function (stats).
Jim
On Fri, May 20, 2016 at 1:56 AM, laomeng_3 <laomeng_3 at 163.com> wrote:
> Hi all:
> As to the anova, we can perform multiple comparison via TukeyHSD.
> But as to chi-square test for frequency table,how to perform multiple comparison?
>
> For example, if I want to compare 3 samples' ratio(the data has 3 rows,each row corresponds to 1 sample,and has 2 columns,each column corresponds to positive and negative respectively).
>
>
> dat<-matrix(c(6,30,8,23,14,3),nrow=3)
> dat
> [,1] [,2]
> [1,] 6 23
> [2,] 30 14
> [3,] 8 3
>
>
>
> chisq.test(dat)
>
> Pearson's Chi-squared test
>
> data: dat
> X-squared = 17.9066, df = 2, p-value = 0.0001293
>
>
> The result shows that the difference between the 3 samples is significant.But if I want to perform multiple comparison to find out which pair of samples is significantly different,which function should be used?
>
>
> Many thanks for your help.
>
> My best
>
>
>
> 发自 网易邮箱大师
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help
mailing list