Hi r-users,
 
I would like to use prop.test code and I also calculate manually to test the proportions for 2 groups.  The problem is the answer for the p-value calculated manually are different from prop.test.  Here are the results:
 
## Manually
 
z value: z= (phat-p)/sqrt(pq/n) = (.084-.081)/sqrt(.081(1-.081)/691)=0.289, pvalue=0.7718
 

## Using prop.test code 
> low <- c(56,58)
> tot <- c(691,691)
> prop.test(low, tot, p = c(56/691,58/691), alternative = "two.sided", conf.level = 0.95, correct = TRUE)
        2-sample test for given proportions with continuity correction
data:  low out of tot, null probabilities c(56/691, 58/691) 
X-squared = 0.0096, df = 2, p-value = 0.9952
alternative hypothesis: two.sided 
null values:
    prop 1     prop 2 
0.08104197 0.08393632 
sample estimates:
    prop 1     prop 2 
0.08104197 0.08393632 
 
 
Thank you so much for any help given.


      
	[[alternative HTML version deleted]]


