# NOT RUN {
# Find the number of clusters per condition needed for a trial with alpha = .05,
# power = 0.8, 50 observations per cluster, expected mean post-test proportion of .50,
# expected difference of .1, ICC = 0.05, cluster level correlation of 0.3, and subject level
# correlation of 0.7.
cpa.did.binary(nsubjects=50 ,p=.5, d=.1, ICC=.05, rho_c=.3, rho_s=.7)
#
# The result, showimg nclusters of greater than 32, suggests 33 clusters per
# condition should be used.
# }
Run the code above in your browser using DataLab