When I do the following simulation using a binary variable, I get outcomes that are a bit difficult to understand:
cluster_size=200
n_sites=50
bin.ma.rct.balanced.4arm.small <- cps.ma.binary(nsim = 12,
nsubjects = list(rep(cluster_size, times=n_sites),
rep(cluster_size, times=n_sites), rep(cluster_size, times=n_sites),
rep(cluster_size, times=n_sites)),
narms = 4,
nclusters = n_sites,
probs = c(0.50, 0.70, 0.01,0.01),
#how to define probs?
sigma_b_sq = c(0.1, 0.15, 0.01,0.01),
#how to define sigma?
alpha = 0.05, allSimData = TRUE,
seed = 123, cores="all")
sapply(bin.ma.rct.balanced.4arm.small$cluster.sizes,sum) %>% sum()
bin.ma.rct.balanced.4arm.small$power
bin.ma.rct.balanced.4arm.small$overall.power2
> bin.ma.rct.balanced.4arm.small$power
Power Lower.95.CI Upper.95.CI Alpha Beta
Arm.2 0.3333333 0.1855618 0.5097025 0.05 0.6666667
Arm.3 0.3333333 0.1855618 0.5097025 0.05 0.6666667
Arm.4 0.3333333 0.1855618 0.5097025 0.05 0.6666667
> bin.ma.rct.balanced.4arm.small$overall.power2
Power Lower.95.CI Upper.95.CI
probability of success 1 0.7353515 1
When I do the following simulation using a binary variable, I get outcomes that are a bit difficult to understand:
Questions: