# NOT RUN {
# Find the number of clusters per condition needed for a trial with alpha = 0.05,
# power = 0.80, 10 person-years per cluster, rate in condition 1 of 0.10
# and condition 2 of 0.20, and CVB = 0.10.
cpa.count(nsubjects=10, r1=0.10, r2=0.20, CVB=0.10)
# The result, showimg nclusters of greater than 24, suggests 25 clusters per
# condition should be used.
# Find the largest CVB compatible with 80% power when there are 25 clusters, 10
# subject-units of time per cluster, and a rate of 0.1 and 0.2 in each condition.
cpa.count(nsubjects=10, nclusters= 25,r1=0.10, r2=0.20, CVB=NA)
# Results show that CVB as high as 0.107 can still yield power this high.
# }
Run the code above in your browser using DataLab