[R] suggestion for proportions
arrayprofile at yahoo.com
Fri Sep 9 19:32:18 CEST 2011
Thanks all again for the suggestions. I agree with Wolfgang that mcnemar.test() is what I am looking for. The accuracy is the proportion of correct diagnosis compared to a gold standard, and I am interested in which diagnosis test is better, not particular interested in assessing the agreement between the 2 tests.
----- Original Message -----
From: Viechtbauer Wolfgang (STAT) <wolfgang.viechtbauer at maastrichtuniversity.nl>
To: "r-help at r-project.org" <r-help at r-project.org>
Cc: csrabak <cesar.rabak at gmail.com>; array chip <arrayprofile at yahoo.com>
Sent: Thursday, September 8, 2011 1:24 AM
Subject: RE: [R] suggestion for proportions
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.
> -----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
> From above clarifying I suggest you consider the use of kappa test. For
> a list of possible ways of doing it in R try:
> Cesar Rabak
More information about the R-help