Hi Bert,

Thanks for your reply. If I understand correctly, prop.test() is not suitable to 
my situation. The input to prop.test() is 2 numbers for each group (# of success 
and # of trials, for example, groups 1 has 5 success out of 10 trials; group 2 
has 3 success out of 7 trials; etc. prop.test() tests whether the probability of 
success is the same across groups.

In my case, each group has several subjects and each subject has 2 numbers (# 
success and # trials). So 

for group 1:
subject 1: 5 success, 10 trials
subject 2: 3 success, 8 trials
:
:

for group 2:
subject a: 7 success, 9 trials
subject b: 6 success, 7 trials
:
:

I want to test whether the probability of success in group 1 is the same as in 
group 2. It's like comparing 2 groups of samples using t test, what I am 
uncertain about is that whether regular t test (or non-pamametric test) is still 
appropriate here when the response variable is actually proportions.

I guess prop.test() can not be used with my dataset, or I may be wrong?

Thanks

John
 
 
 




________________________________
From: Bert Gunter <gunter.berton@gene.com>

Sent: Wed, February 9, 2011 3:58:05 PM
Subject: Re: [R] comparing proportions

1. Is this a homework problem?

2. ?prop.test

3. If you haven't done so already, get and consult a basic statistical
methods book to help you with questions such as this.

-- Bert


> Hi, I have a dataset that has 2 groups of samples. For each sample, then
> response measured is the number of success (no.success) obatined with the 
>number
> of trials (no.trials). So a porportion of success (prpop.success) can be
> computed as no.success/no.trials. Now the objective is to test if there is a
> statistical significant difference in the proportion of success between the 2
> groups of samples (say n1=20, n2=30).
>
> I can think of 2 ways to do the test:
>
> 1. regular t test based on the variable prop.success
> 2. Mann-Whitney test based on the variable prop.success
> 2. do a binomial regression as:
>     fit<-glm(cbind(no.success,no.trials-no.success) ~ group, data=data,
>          family=binomial)
>     anova(fit, test='Chisq')
>
> My questions is:
> 1. Is t test appropriate for comparing 2 groups of proportions?
> 2. how about Mann-Whitney non-parametric test?
> 3. Among the 3, which technique is more appropriate?
> 4. any other technique you can suggest?
>
> Thank you,
>
> John
>
>
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help@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.
>
>



-- 
Bert Gunter
Genentech Nonclinical Biostatistics



      
	[[alternative HTML version deleted]]

