Solution file for additional exercise 13.3 ------------------------------------------ Planning of a study on the effect of a social marketing campaign for smoke-free homes, with the aim of comparing two regions (presence and absence of campaign). The sample size calculation is based on comparing the two regions after the campaign wrt. their proportions of pre-contemplatory homes, or on comparing pre- and post-campaign values within the same region. Both of these situations would be two independent samples (note that it is not the same households being interviewed before and after the campaign). Effect sizes of interest are 0.1 and 0.01, with an estimated non-campaign proportion of 0.55. The output from Minitab's power menu (see appendices for Stata and R listings) gives the results. MTB > Power; SUBC> PTwo; SUBC> PCompare .45 .54; SUBC> Power .8; SUBC> PBaseline .55. Power and Sample Size Test for Two Proportions Testing comparison p = baseline p (versus not =) Calculating power for baseline p = 0.55 Alpha = 0.05 Sample Target Comparison p Size Power Actual Power 0.45 392 0.8 0.800741 0.54 38926 0.8 0.800008 The sample size is for each group. Comments: --------- To detect a difference of 0.1 requires about 400 families. To detect a difference of 0.01 is almost impossible. --- Appendix: output from power calculation using the Stata menu: . power twoproportions .55 (.45 .54), test(chi2) Performing iteration ... Estimated sample sizes for a two-sample proportions test Pearson's chi-squared test Ho: p2 = p1 versus Ha: p2 != p1 +-----------------------------------------------------------------+ | alpha power N N1 N2 delta p1 p2 | |-----------------------------------------------------------------| | .05 .8 784 392 392 -.1 .55 .45 | | .05 .8 77852 38926 38926 -.01 .55 .54 | +-----------------------------------------------------------------+ Same thing with a continuity correction (presumed to give more accurate values): . power twoproportions .55 (.45 .54), test(chi2) continuity Performing iteration ... Estimated sample sizes for a two-sample proportions test Pearson's chi-squared test Ho: p2 = p1 versus Ha: p2 != p1 +-----------------------------------------------------------------+ | alpha power N N1 N2 delta p1 p2 | |-----------------------------------------------------------------| | .05 .8 824 412 412 -.1 .55 .45 | | .05 .8 78250 39125 39125 -.01 .55 .54 | +-----------------------------------------------------------------+ We could also try the same based on a likelihood-ratio chi-square test (instead of the Pearson chi-square test), effectively replacing the option test(chi2) with test(lrchi2). The results are however in this case exactly the same as with the Pearson chi-square test without continuity correction. The menu for Fisher's exact test only allows calculation of power, so one would need to use a trial-and-error approach to get a sample size corresponding to a certain power. --- Appendix: output from power calculation using R function: > power.prop.test(p1=.55, p2=.45, sig.level=0.05, power=0.8, alternative="two.sided") Two-sample comparison of proportions power calculation n = 391.263 p1 = 0.55 p2 = 0.45 sig.level = 0.05 power = 0.8 alternative = two.sided NOTE: n is number in *each* group > power.prop.test(p1=.55, p2=.54, sig.level=0.05, power=0.8, alternative="two.sided") Two-sample comparison of proportions power calculation n = 38925.34 p1 = 0.55 p2 = 0.54 sig.level = 0.05 power = 0.8 alternative = two.sided NOTE: n is number in *each* group