## Consider an example with three active treatment
## groups and a placebo. Suppose that the response
## mean for placebo is 0.43 and 0.48, 0.63, and 1.2
## for three active treatment groups. The standard
## deviation is 1 for all groups. The total sample
## size is N = 120 with a burn-in period M = 60. We
## use the randomization vector of (8, 9, 2, 1),
## which means that placebo, the best performing
## group, the second-best group, and the worst group
## have randomization probabilities 8/20, 9/20, 2/20
## 1/20, respectively. The one-sided significance
## level is considered at 2.5%. Nitt = 100 is for
## demonstration, and should be increased to 10^5
## in practice.
##
library(parallel)
library(doParallel)
RABR.fit = RABRcontinuous(
MeanVec = c(0.43, 0.48, 0.63, 1.2),
SdVec = c(1, 1, 1, 1),
M = 60,
N = 120,
R = c(8, 9, 2, 1),
Nitt = 100,
Alpha = 0.025,
Ncluster = 2,
Seed = 12345,
MultiMethod = "dunnett")
##
## 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