zhijie zhang
2007-Jul-19 14:07 UTC
[R] Can I test if there are statistical significance between different rows in R*C table?
Dear friends, My R*C table is as follow: better good bad Goup1 16 71 37 Group2 0 4 61 Group3 1 6 57 Can I test if there are statistical significant between Group1 and Group2, Group2 and Group3, Group1 and Group2, taking into the multiple comparisons? The table can be set up using the following program: a<-matrix(data=c(16,71,37,0,4,61,1,6,57),nrow=3,byrow=TRUE) Thanks very much. -- With Kind Regards, oooO::::::::: (..)::::::::: :\.(:::Oooo:: ::\_)::(..):: :::::::)./::: ::::::(_/:::: ::::::::::::: [***********************************************************************] Zhi Jie,Zhang ,PHD Tel:86-21-54237149 Dept. of Epidemiology,School of Public Health,Fudan University Address:No. 138 Yi Xue Yuan Road,Shanghai,China Postcode:200032 Email:epistat@gmail.com Website: www.statABC.com [***********************************************************************] oooO::::::::: (..)::::::::: :\.(:::Oooo:: ::\_)::(..):: :::::::)./::: ::::::(_/:::: ::::::::::::: [[alternative HTML version deleted]]
Uwe Ligges
2007-Jul-20 11:11 UTC
[R] Can I test if there are statistical significance between different rows in R*C table?
zhijie zhang wrote:> Dear friends, > My R*C table is as follow: > > > > better > > good > > bad > > Goup1 > > 16 > > 71 > > 37 > > Group2 > > 0 > > 4 > > 61 > > Group3 > > 1 > > 6 > > 57 > > Can I test if there are statistical significant between Group1 and > Group2, Group2 and Group3, Group1 and Group2, taking into the multiple > comparisons?So what is you hypothesis? Statistical significance of what it to be tested? Uwe Ligges> The table can be set up using the following program: > > a<-matrix(data=c(16,71,37,0,4,61,1,6,57),nrow=3,byrow=TRUE) > Thanks very much. > >
Yvonnick NOEL
2007-Jul-23 19:18 UTC
[R] Can I test if there are statistical significance between different rows in R*C table?
> With the totally non-committal P-value for Group 2 vs Group 3, > and the absolutely decisive P-value for Group 1 vs Groups 2&3, > there is no need whatever to bother with "multiple comparison" > complications.Note that you can test this as the formal comparison between three nested multinomial models, the first assuming homogeneity of all three response distributions (M0), the second assuming a similar multinomial distribution for groups 2 and 3, and a specific one for the first group (M1), and the saturated model (M3). Maximum likelihood estimates of the corresponding multinomial probabilities are: M0 Resp Bad Better Good Group Grp1 0.613 0.067 0.320 Grp2 0.613 0.067 0.320 Grp3 0.613 0.067 0.320 M1 Resp Bad Better Good Group Grp1 0.298 0.129 0.573 Grp2 0.915 0.008 0.078 Grp3 0.915 0.008 0.078 M2 Resp Bad Better Good Group Grp1 0.298 0.129 0.573 Grp2 0.938 0.000 0.062 Grp3 0.891 0.016 0.094 Comparing them with a likelihood ratio, rather than a Pearson chi-square, is probably more appropriate, given the additivity property of likelihood ratio with nested models. You get: res. df. res. dev. df. lik.ratio P(>chi2) AIC BIC M0 4.000 114.023 154.959 162.026 M1 2.000 1.917 2.000 112.106 4.533e-25 46.852 60.986 M2 0.000 4.122e-10 2.000 1.917 0.383 48.936 70.136 M1 is clearly the best model on these data. You can view this as an equivalent of orthogonal contrasts in ANOVA, and so indeed you do not have to worry about correcting your alpha. HTH Yvonnick Noel University of Rennes 2 France
Yvonnick NOEL
2007-Jul-24 05:49 UTC
[R] Can I test if there are statistical significance between different rows in R*C table?
zhijie zhang a ?crit :> Dear Noel, > Your answers should be what i'm looking for. > Could u please show me the corresponding programs and the paper/book > for the theories?I usually fit these models as conditional Poisson loglinear models, so the glm() function may be used. On the equivalence of binomial (or multinomial) and loglinear models (conditionally to joint counts on the independent variables), see chapter 2 of: Lindsey, J.K (1999). Applying Generalized Linear Models, Springer. Also take a look at: https://home.comcast.net/~lthompson221/Splusdiscrete2.pdf I have a small script that does the job, with an example script that should be self-explanatory: http://yvonnick.noel.free.fr/r2stats/multinom.R http://yvonnick.noel.free.fr/r2stats/mnm-example.R Yvonnick Noel U. of Rennes 2 France