# NOT RUN {
## EXAMPLE 1:
## You have been asked to design a cross-sectional study on the smoking
## prevalence among male and female university students. Your hypothesis is that
## the prevalence of smoking is higher among male students (around 50%)
## compared with female students (35%). How many students would need to be
## enrolled into a study if you would like to 80% certain of detecting a
## prevalence ratio of 0.50 / 0.35 = 1.4 using a 0.05 significance test?
## Assume that equal numbers of males and females will be recruited into the
## study.
epi.ssxsectn(pexp1 = 0.50, pexp0 = 0.35, n = NA, power = 0.80,
r = 1, design = 1, sided.test = 2, conf.level = 0.95)
## A total of 340 students will be required to take part in the study: 170
## males and 170 females.
# }
Run the code above in your browser using DataLab