## Consider an example with two active treatment
## groups and a placebo. Suppose that the response
## rate of placebo is 0.15, 0.28 and 0.4 for
## two active treatment groups. The total sample
## size is N = 180 with a burn-in period M = 90. We
## use the randomization vector of (7, 7, 1),
## which means that placebo, the better performing
## group, and the worse group have randomization
## probabilities 7/15, 7/15, 1/15 respectively.
## The one-sided significance level is 2.5%.
## Nitt = 100 is for demonstration, and should be
## increased to 10^5 in practice.
##
library(parallel)
library(doParallel)
RABR.fit = RABRbinary(
RateVec = c(0.15, 0.28, 0.4),
M = 90,
N = 180,
R = c(7, 7, 1),
Nitt = 100,
Alpha = 0.025,
Ncluster = 2,
Seed = 12345,
MultiMethod = "bonferroni")
##
## Probability of rejecting each elementary null
## hypothesis without multiplicity adjustment
print(RABR.fit$ProbUnadj)
##
## Probability of rejecting each elementary null
## hypothesis with multiplicity adjustment
print(RABR.fit$ProbAdj)
##
## Probability of selecting and confirming the
## efficacy of each active treatment group
print(RABR.fit$ProbAdjSelected)
##
## ProbAdjOverall Probability of rejecting at
## least one elementary null hypothesis
## with multiplicity adjustment
print(RABR.fit$ProbAdjOverall)
##
## ASN Average sample size of placebo and active
## treatment groups
print(RABR.fit$ASN)
Run the code above in your browser using DataLab