[R] suggestion for proportions

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Thu Sep 8 10:24:50 CEST 2011


I assume you mean Cohen's kappa. This is not what the OP is asking about. The OP wants to know how to test for a difference in the proportions of 1's. Cohen's kappa will tell you what the level of agreement is between the two tests. This is something different.

Also, the OP has now clarified that the data are paired. Therefore, prop.test() and binom.test() are not appropriate. So, to answer the OPs question: yes, mcnemar.test() is what you should be using.

Wolfgang

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of csrabak
> Sent: Thursday, September 08, 2011 02:31
> To: array chip
> Cc: r-help at r-project.org
> Subject: Re: [R] suggestion for proportions
> 
> Em 7/9/2011 16:53, array chip escreveu:
> > Hi all, thanks very much for sharing your thoughts. and sorry for my
> describing the problem not clearly, my fault.
> >
> > My data is paired, that is 2 different diagnostic tests were performed
> on the same individuals. Each individual will have a test results from
> each of the 2 tests. Then in the end, 2 accuracy rates were calculated for
> the 2 tests. And I want to test if there is a significant difference in
> the accuracy (proportion) between the 2 tests. My understanding is that
> prop.test() is appropriate for 2 independent proportions,  whereas in my
> situation, the 2 proportions are not independent calculated from "paired"
> data, right?
> >
> > the data would look like:
> >
> > pid   test1    test2
> > p1      1         0
> > p2      1         1
> > p3      0         1
> > :
> > :
> >
> > 1=test is correct; 0=not correct
> >
> > from the data above, we can calculate accuracy for test1 and test2, then
> to compare....
> >
> >
> > So mcnemar.test() is good for that, right?
> >
> > Thanks
> >
> John,
> 
>  From above clarifying I suggest you consider the use of kappa test. For
> a list of possible ways of doing it in R try:
> RSiteSearch("kappa",restrict="functions")
> 
> HTH
> 
> --
> Cesar Rabak



More information about the R-help mailing list