Re: [R] Comparing two groups of proportions

From: Greg Snow <Greg.Snow_at_imail.org>
Date: Mon, 09 Jun 2008 20:57:54 -0600

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. Received on Tue 10 Jun 2008 - 03:37:34 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 - 04:30:37 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