[R] how to perform multiple comparison?

laomeng_3 laomeng_3 at 163.com
Thu May 19 17:56:39 CEST 2016


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]]



More information about the R-help mailing list