[R] Comparing two groups of proportions

Greg Snow Greg.Snow at imail.org
Tue Jun 10 06:11:09 CEST 2008


You're right, I did not read close enough and thought that there were 2 seperate groups from each production line, not the same group and based the analysis on that.  With the same items being tested with both methods the information on the individual items should be included (either as a fixed effect in a logistic regression model, or possibly better as a mixed effects model).  Either way there needs to be more detail on the individual items, not just the summaries presented.

________________________________________
From: Rolf Turner [r.turner at auckland.ac.nz]
Sent: Monday, June 09, 2008 9:16 PM
To: Greg Snow
Cc: R-help forum
Subject: Re: [R] Comparing two groups of proportions

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!

Not much actual quality being assured there!

        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}}



More information about the R-help mailing list