## EXAMPLE 1 (from Woodward 2005 pp. 403 - 404):
## A government initiative has decided to reduce the prevalence of male
## smoking to, at most, 30%. A sample survey is planned to test, at the
## 0.05 level, the hypothesis that the percentage of smokers in the male
## population is 30% against the one-sided alternative that it is greater.
## The survey should be able to find a prevalence of 32%, when it is true,
## with 0.90 power. How many men need to be sampled?
epi.propsize(treat = 0.30, control = 0.32, n = NA, power = 0.90,
r = 1, design = 1, sided.test = 1, conf.level = 0.95)
## ## A total of 18,315 men should be sampled: 9158 in the treatment group and
## 9158 in the control group.
Run the code above in your browser using DataLab