Seminar aus Statistik für das Magisterstudium - Example 5.5
(From Day (1988)): In a study of nausea after anaesthesia the expected rates are TLS= 0.10, it,= 0.20, and we want a power of 80% to detect this difference at the 1% level.
- How many patients are required?
> power.prop.test(p1=0.1,p2=0.2,power=0.8,sig.level=.01) Two-sample comparison of proportions power calculation n = 296.3702 p1 = 0.1 p2 = 0.2 sig.level = 0.01 power = 0.8 alternative = two.sided NOTE: n is number in *each* group
- If that difference were observed, what would the 95 confidence limits be?
> sqrt(4 * qnorm(1-(.05/2))^2 * (0.1 * (1 - 0.1) + 0.2 * (1-0.2)) / 297) # gesamte breite  0.1137286
- If an accuracy of —2% to +2% were required for the estimate of the difference, what sample size would be required?
- Suppose the observed difference were smaller, with rates of 10% versus 12%; what would the confidence interval be?
- To obtain limits within —2% and +2%, how large should the sample be?