Re: [R] Comparing two groups of proportions

From: Greg Snow <Greg.Snow_at_imail.org>
Date: Tue, 10 Jun 2008 08:50:18 -0600

Actually, if you have the information on the individual units, then the production line information is redundant and you can just use Mcnemar's test comparing QA1 to QA2. Though as Rolf mentioned, this will not give the same information as if you have true state and can compare false positives and false negatives.

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow_at_imail.org
(801) 408-8111




> -----Original Message-----
> From: r-help-bounces_at_r-project.org
> [mailto:r-help-bounces_at_r-project.org] On Behalf Of Ivan Adzhubey
> Sent: Tuesday, June 10, 2008 12:09 AM
> To: r-help_at_r-project.org
> Subject: Re: [R] Comparing two groups of proportions
>
> Hi Rolf,
>
> On Monday 09 June 2008 11:16:57 pm Rolf Turner wrote:
> > Your approach tacitly assumes --- as did the poster's question ---
> > that the probability of passing an item by one method is
> *independent*
> > of whether it is passed by the other method. Which makes
> the methods
> > effectively independent of the nature of the item being assessed!
>
> So it seems I can't just block my primary factor (QA
> procedure) by nuisance one (production line) and run Cochran
> test to see if effects of primary factor are identical for
> both its levels.

>
> > Not much actual quality being assured there!
>
> In fact, I am not interested in quality of QA procedures as
> much as in how different the results are (error component).
>
> Thanks,
> Ivan
>
> > cheers,
> >
> > Rolf Turner
> >
> > On 10/06/2008, at 2:57 PM, Greg Snow wrote:
> > > here is one approach:
> > >
> > > res <- cbind( c(10, 5, 1, 12, 3, 8, 7, 2, 10, 1),
> > > c(90,15,79,38,7,92,13,78,40,9) )
> > >
> > > line <- gl(5,1,length=10, labels=LETTERS[1:5])
> > >
> > > qa <- gl(2,5)
> > >
> > > fit <- glm( res ~ line*qa, family=binomial )
> > >
> > > summary(fit)
> > >
> > > anova(fit, test='Chisq')
> > >
> > > The interaction terms measure the difference between the
> different
> > > combinations of QA method and production line, if they are all 0,
> > > then that means the effect of QA is the same accross production
> > > lines and the qa main effect measures the difference
> between the 2
> > > methods (allowing for differences in the prodoction
> lines), testing
> > > if that equals 0 should answer your question.
> > >
> > > Hope this helps,
> > >
> > >
> > > ________________________________________
> > > From: r-help-bounces_at_r-project.org
> [r-help-bounces_at_r-project.org] On
> > > Behalf Of Ivan Adzhubey [iadzhubey_at_rics.bwh.harvard.edu]
> > > Sent: Monday, June 09, 2008 4:28 PM
> > > To: r-help_at_r-project.org
> > > Subject: [R] Comparing two groups of proportions
> > >
> > > Hi,
> > >
> > > I have a seemingly common problem but I can't find a
> proper way to
> > > approach it. Let's say we have 5 samples (different size) of IC
> > > circuits coming from 5 production lines (A, B, C, D, E). We apply
> > > two different non- destructive QA procedures to each sample,
> > > producing to sets of binary outcomes
> > > (passed:
> > > no/yes). So, we have two groups of proportions:
> > >
> > > QA1 QA2
> > > no/yes no/yes
> > > A 10/90 8/92
> > > B 5/15 7/13
> > > C 1/79 2/78
> > > D 12/38 10/40
> > > E 3/7 1/9
> > >
> > > How would I test if the two QA procedures in question give
> > > significantly different results, at the same time controlling for
> > > the possible production line contribution? It looks like
> there are
> > > many variants of multiple proportions tests available in R and
> > > various extra packages but none seems to exactly fit this very
> > > simple problem. I would appreciate any advice.
> > >
> > > Thanks,
> > > Ivan
> > >
> > > The information transmitted in this electronic communica...
> > > {{dropped:10}}
> > >
> > > ______________________________________________
> > > R-help_at_r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide
> http://www.R-project.org/posting-
> > > guide.html and provide commented, minimal, self-contained,
> > > reproducible code.
> > >
> > > ______________________________________________
> > > R-help_at_r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide
> http://www.R-project.org/posting-
> > > guide.html and provide commented, minimal, self-contained,
> > > reproducible code.
> >
> >
> ######################################################################
> > Attention:\ This e-mail message is privileged and
> > confid...{{dropped:9}}
> >
> > ______________________________________________
> > R-help_at_r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html and provide commented,
> > minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Tue 10 Jun 2008 - 15:26:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 10 Jun 2008 - 15:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive