[R] suggestion for proportions
arrayprofile at yahoo.com
Wed Sep 7 21:53:22 CEST 2011
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?
----- 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: Bert Gunter <gunter.berton at gene.com>
Sent: Wednesday, September 7, 2011 8:14 AM
Subject: Re: [R] suggestion for proportions
Indeed, the original post leaves some room for interpretation. In any case, I hope the OP has enough information now to figure out what approach is best for his data.
> -----Original Message-----
> From: Bert Gunter [mailto:gunter.berton at gene.com]
> Sent: Wednesday, September 07, 2011 16:47
> To: Viechtbauer Wolfgang (STAT)
> Cc: r-help at r-project.org; John Sorkin
> Subject: Re: [R] suggestion for proportions
> On Wed, Sep 7, 2011 at 7:28 AM, Viechtbauer Wolfgang (STAT)
> <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
> > Acutally,
> > ?mcnemar.test
> > since it is paired data.
> Actually, it is unclear to me from the OP's message whether this is the
> In one sentence the OP says that the _number_ of samples is the same,
> and in the next he says that "essentially" the samples are the same.
> So, as usual, imprecision in the problem description leads to
> imprecision in the solution.
> But your point is well taken, of course.
> -- Bert
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help