rmjohnston at mac.com
2006-Oct-31 01:50 UTC
[Rd] Confidence interval calculation in prop.test (PR#9325)
Full_Name: Richard Johnston Version: 2.4.0 OS: OS X Submission from: (NULL) (69.169.0.241) The confidence interval calculation for prop.test appears incorrect when alternative="greater" . The upper limit is always set to 1.0000. The lower limit appears to be correct.> total=c(250,250) > success=c(55,31) > prop.test(success,total,alternative="greater",correct=TRUE)2-sample test for equality of proportions with continuity correction data: success out of total X-squared = 7.4289, df = 1, p-value = 0.003209 alternative hypothesis: greater 95 percent confidence interval: 0.03693065 1.00000000 sample estimates: prop 1 prop 2 0.220 0.124
Duncan Murdoch
2006-Oct-31 02:20 UTC
[Rd] Confidence interval calculation in prop.test (PR#9325)
On 10/30/2006 8:50 PM, rmjohnston at mac.com wrote:> Full_Name: Richard Johnston > Version: 2.4.0 > OS: OS X > Submission from: (NULL) (69.169.0.241) > > > The confidence interval calculation for prop.test appears incorrect when > alternative="greater" . The upper limit is always set to 1.0000. The lower > limit appears to be correct.That looks like a one-sided confidence interval, i.e. an interval of the type Delta > 0.0369, where Delta is the difference in proportions. It is then clipped to [-1, 1], since that's the largest possible range for the difference. What were you expecting to see? Duncan Murdoch> >> total=c(250,250) >> success=c(55,31) >> prop.test(success,total,alternative="greater",correct=TRUE) > > 2-sample test for equality of proportions with continuity correction > > data: success out of total > X-squared = 7.4289, df = 1, p-value = 0.003209 > alternative hypothesis: greater > 95 percent confidence interval: > 0.03693065 1.00000000 > sample estimates: > prop 1 prop 2 > 0.220 0.124 > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Reasonably Related Threads
- Confidence interval calculation in prop.test
- R: prop.test() and the simultaneous confidence interval for multiple proportions in R
- confidence interval given by prop.test()
- prop.test vs hand calculated confidence interval
- Confidence interval for the difference between proportions - method used in prop.test()