# NOT RUN {
# Estimate power for a trial with 3 steps and 12 clusters in arm 1
# (often the standard-of-care or 'control' arm) at the initiation of the study.
# Those clusters have 50 subjects each, with sigma_b_sq = 1.
# We have estimated arm outcome proportions of 0.1 and 0.2 in the first and second arms,
# respectively, and 100 simulated data sets analyzed by the GLMM method. Using seed = 123,
# the resulting power should be 0.8.
# }
# NOT RUN {
binary.sw.rct = cps.sw.binary(nsim = 100, nsubjects = 50, nclusters = 12,
p0 = 0.1, p1 = 0.2, steps = 3,
sigma_b_sq = 1, alpha = 0.05, method = 'glmm',
quiet = FALSE, allSimData = FALSE, seed = 123)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab