Title: | Adaptive Subgroup Selection in Group Sequential Trials |
---|---|
Description: | Clinical trial design for subgroup selection in three-stage group sequential trial. Includes facilities for design, exploration and analysis of such trials. An implementation of the initial DEFUSE-3 trial is also provided as a vignette. |
Authors: | Tze Leung Lai [ctb], Philip Lavori [aut], Olivia Liao [aut], Balasubramanian Narasimhan [aut, cre], Ka Wai Tsang [aut] |
Maintainer: | Balasubramanian Narasimhan <[email protected]> |
License: | GPL(>=2) |
Version: | 1.4.3 |
Built: | 2024-11-19 06:29:30 UTC |
Source: | https://github.com/bnaras/assistant |
ASSISTant
is a package that implements a three-stage adaptive clinical trial design with
provision for subgroup selection where the treatment may be effective. The main design object
is an R6
class that can be instantiated and manipulated to obtain the operating
characteristics. A vignette is provided showing the use of this package for designing the DEFUSE-3
trial, described in the paper by Lai, Lavori and Liao. The package contains everything necessary
to reproduce the results of the paper.
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). http://www.sciencedirect.com/science/article/pii/S1551714414001311
Adaptive design of confirmatory trials: Advances and challenges, http://www.sciencedirect.com/science/article/pii/S1551714415300239 by Tze Leung Lai and Philip W. Lavori and Ka Wai Tsang. Contemporary Clinical Trials, Vol. 45, Part A, pp 93-102 (2015).
ASSISTDesign
objects are used to design, simulate and analyze
adaptive group sequential clinical trial with three stages.
# design <- ASSISTDesign$new(trialParameters, designParameters)
# design <- ASSISTDesign$new(trialParameters, designParameters)
An R6Class
generator object
ASSISTDesign$new(designParameters, trialParameters, discreteData = FALSE, boundaries)
Create a new
ASSISTDesign
instance object using the parameters specified. If discreteData
is TRUE
use a discrete distribution for the Rankin scores and designParameters
must contain the appropriate distributions to sample from. If boundaries
is specified, it used.
getDesignParameters
,getTrialParameters
,
getBoundaries
Accessor methods for (obvious) object fields
setBoundaries
Modifier method for boundaries a
named vector of double values with names btilde
,
b
, and c
, in that order
print()
Print the object in a human readable form
computeCriticalValues()
Compute the critical boundary values ,
and
for futility, efficacy and final efficacy decisions; saved in field
boundaries
explore(numberOfSimulations = 5000, rngSeed = 12345)
Explore the
design using the specified number of simulations and random number seed. There are a number of further parameters. By default trueParameters = self$getDesignParameters()
as would be the case for a Type I error calculation. If changed, would yield power. Also recordStats = TRUE/FALSE
, showProgress = TRUE/FALSE
, saveRawData = TRUE/FALSE
control recording statistics, raw data saves, display of progress. Fixed sample size (fixedSampleSize = TRUE/FALSE
) can be specified to ensure that patients lost after a futile overall look are not made up. Returns a list of results
analyze(trialExploration)
Analyze
the design given the trialExploration
which is the result of a call to explore
to
simulate the design. Return a list of summary quantities
summary(analysis)
Print the operating characteristics of the design, using the analysis
result from the analyze
call
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). doi:10.1016/j.cct.2014.09.001g
LLL.SETTINGS
for an explanation of trial parameters
## Not run: data(LLL.SETTINGS) prevalence <- LLL.SETTINGS$prevalences$table1 scenario <- LLL.SETTINGS$scenarios$S0 designParameters <- list(prevalence = prevalence, mean = scenario$mean, sd = scenario$sd) designA <- ASSISTDesign$new(trialParameters = LLL.SETTINGS$trialParameters, designParameters = designParameters) print(designA) ## A realistic design uses 5000 simulations or more! result <- designA$explore(showProgress = interactive()) analysis <- designA$analyze(result) designA$summary(analysis) ## End(Not run) ## For full examples, try: ## browseURL(system.file("full_doc/ASSISTant.html", package="ASSISTant"))
## Not run: data(LLL.SETTINGS) prevalence <- LLL.SETTINGS$prevalences$table1 scenario <- LLL.SETTINGS$scenarios$S0 designParameters <- list(prevalence = prevalence, mean = scenario$mean, sd = scenario$sd) designA <- ASSISTDesign$new(trialParameters = LLL.SETTINGS$trialParameters, designParameters = designParameters) print(designA) ## A realistic design uses 5000 simulations or more! result <- designA$explore(showProgress = interactive()) analysis <- designA$analyze(result) designA$summary(analysis) ## End(Not run) ## For full examples, try: ## browseURL(system.file("full_doc/ASSISTant.html", package="ASSISTant"))
ASSISTDesignB
objects are used to design a trial with certain
characteristics provided in the object instantiation method. This design differs from
ASSISTDesign
in only how it computes the critical boundaries, how it performs the interim look,
and what quantities are computed in a trial run.
# design <- ASSISTDesignB$new(trialParameters, designParameters, discreteData)
# design <- ASSISTDesignB$new(trialParameters, designParameters, discreteData)
An R6Class
generator object
ASSISTDesignB$new(designParameters, trialParameters, discreteData = FALSE, boundaries)
Create a new ASSISTDesign
instance object using the parameters specified. If discreteData
is TRUE
use a discrete distribution for the Rankin
scores and designParameters
must contain the appropriate distributions to sample from. If boundaries
is specified, it is used
getDesignParameters
,getTrialParameters
,
getBoundaries
Accessor methods for (obvious) object slots
setBoundaries
Modifier method for boundaries a
named vector of double values with names btilde
,
b
, and c
, in that order
print()
Print the object in a human readable form
computeCriticalValues()
Compute the critical boundary value
explore(numberOfSimulations = 5000, rngSeed = 12345)
Explore the design
using the specified number of simulations and random number seed. There are further parameters. By default trueParameters = self$getDesignParameters()
as would be the case for a Type I error calculation. If changed, would yield power. Also showProgress = TRUE/FALSE
, saveRawData = TRUE/FALSE
control raw data saves and display of progress. Returns a list of results
analyze(trialExploration)
Analyze
the design given the trialExploration
which is the result of a call to explore
to
simulate the design. Return a list of summary quantities
summary(analysis)
Print the operating characteristics of the design, using the analysis
result from the analyze
call
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). doi:10.1016/j.cct.2014.09.001g
ASSISTDesign
which is a superclass of this object
## Not run: data(LLL.SETTINGS) prevalence <- LLL.SETTINGS$prevalences$table1 scenario <- LLL.SETTINGS$scenarios$S0 designParameters <- list(prevalence = prevalence, mean = scenario$mean, sd = scenario$sd) designB <- ASSISTDesignB$new(trialParameters = LLL.SETTINGS$trialParameters, designParameters = designParameters) print(designB) ## A realistic design uses 5000 simulations or more! result <- designB$explore(showProgress = interactive()) analysis <- designB$analyze(result) designB$summary(analysis) ## End(Not run) ## For full examples, try: ## browseURL(system.file("full_doc/ASSISTant.html", package="ASSISTant"))
## Not run: data(LLL.SETTINGS) prevalence <- LLL.SETTINGS$prevalences$table1 scenario <- LLL.SETTINGS$scenarios$S0 designParameters <- list(prevalence = prevalence, mean = scenario$mean, sd = scenario$sd) designB <- ASSISTDesignB$new(trialParameters = LLL.SETTINGS$trialParameters, designParameters = designParameters) print(designB) ## A realistic design uses 5000 simulations or more! result <- designB$explore(showProgress = interactive()) analysis <- designB$analyze(result) designB$summary(analysis) ## End(Not run) ## For full examples, try: ## browseURL(system.file("full_doc/ASSISTant.html", package="ASSISTant"))
ASSISTDesignC
objects are used to design a trial with certain
characteristics provided in the object instantiation method. This design differs from
ASSISTDesign
in only how it computes the critical boundaries, how it performs the interim look,
and what quantities are computed in a trial run.
# design <- ASSISTDesignC$new(trialParameters, designParameters)
# design <- ASSISTDesignC$new(trialParameters, designParameters)
An R6Class
generator object
ASSISTDesignC$new(designParameters, trialParameters, discreteData = FALSE, boundaries)
Create a new
ASSISTDesign
instance object using the parameters specified. If discreteData
is TRUE
use a discrete distribution for the Rankin scores and designParameters
must contain the appropriate distributions to sample from. If 'boundaries is specified, it is used.
getDesignameters
,getTrialParameters
,
getBoundaries
Accessor methods for (obvious) object slots
setBoundaries
Modifier method for boundaries a
named vector of double values with names btilde
,
b
, and c
, in that order
print()
Print the object in a human readable form
computeCriticalValues()
Compute the critical boundary value
explore(numberOfSimulations = 5000, rngSeed = 12345
Explore the design
using the specified number of simulations and random number seed. There are further parameters. By default trueParameters = self$getDesignParameters()
as would be the case for a Type I error calculation. If changed, would yield power. Also showProgress = TRUE/FALSE
, saveRawData = TRUE/FALSE
control raw data saves and display of progress. Returns a list of results
analyze(trialExploration)
Analyze
the design given the trialExploration
which is the result of a call to explore
to
simulate the design. Return a list of summary quantities
summary(analysis)
Print the operating characteristics of the design, using the analysis
result from the analyze
call
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). doi:10.1016/j.cct.2014.09.001g
ASSISTDesignB
which is a superclass of this object
data(LLL.SETTINGS) prevalence <- LLL.SETTINGS$prevalences$table1 scenario <- LLL.SETTINGS$scenarios$S0 designParameters <- list(prevalence = prevalence, mean = scenario$mean, sd = scenario$sd) ## A realistic design uses 5000 simulations or more! designC <- ASSISTDesignC$new(trialParameters = LLL.SETTINGS$trialParameters, designParameters = designParameters) print(designC) result <- designC$explore(numberOfSimulations = 100, showProgress = interactive()) analysis <- designC$analyze(result) designC$summary(analysis) ## For full examples, try: ## browseURL(system.file("full_doc/ASSISTant.html", package="ASSISTant"))
data(LLL.SETTINGS) prevalence <- LLL.SETTINGS$prevalences$table1 scenario <- LLL.SETTINGS$scenarios$S0 designParameters <- list(prevalence = prevalence, mean = scenario$mean, sd = scenario$sd) ## A realistic design uses 5000 simulations or more! designC <- ASSISTDesignC$new(trialParameters = LLL.SETTINGS$trialParameters, designParameters = designParameters) print(designC) result <- designC$explore(numberOfSimulations = 100, showProgress = interactive()) analysis <- designC$analyze(result) designC$summary(analysis) ## For full examples, try: ## browseURL(system.file("full_doc/ASSISTant.html", package="ASSISTant"))
Return a vector of column names for statistics for a given stage
colNamesForStage(stage, J)
colNamesForStage(stage, J)
stage |
the trial stage (1 to 3 inclusive). |
J |
the number of subgroups |
a character vector of the column names
Compute the mean and sd of a discrete Rankin distribution
computeMeanAndSD(probVec = rep(1, 7L), support = 0L:6L)
computeMeanAndSD(probVec = rep(1, 7L), support = 0L:6L)
probVec |
a probability vector of length equal to length of support, default is uniform |
support |
a vector of support values (default 0:6 for Rankin Scores) |
a named vector of mean
and sd
Compute the three modified Haybittle-Peto boundaries
computeMHPBoundaries(prevalence, N, alpha, beta, eps, futilityOnly = FALSE)
computeMHPBoundaries(prevalence, N, alpha, beta, eps, futilityOnly = FALSE)
prevalence |
the vector of prevalences between 0 and 1 summing
to 1. |
N |
a three-vector of total sample size at each stage |
alpha |
the type I error |
beta |
the type II error |
eps |
the fraction (between 0 and 1) of the type 1 error to spend in the interim stages 1 and 2 |
futilityOnly |
a logical value indicating only the futility
boundary is to be computed; default |
a named vector of three values containing
, b, c
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). http://www.sciencedirect.com/science/article/pii/S1551714414001311
Compute the three modified Haybittle-Peto boundaries and effect size
computeMHPBoundaryITT(prevalence, alpha)
computeMHPBoundaryITT(prevalence, alpha)
prevalence |
the vector of prevalences between 0 and 1 summing
to 1. |
alpha |
the type I error |
a named vector of a single value containing the value for c
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). http://www.sciencedirect.com/science/article/pii/S1551714414001311
DEFUSE3Design
is a slight variant of the the adaptive
clinical trial design of Lai, Lavori and Liao. Simulation is used to compute
the expected maximum sample size and the boundary for early futility is adjusted to
account as well.
# design <- DEFUSE3Design$new(designParameters, trialParameters)
# design <- DEFUSE3Design$new(designParameters, trialParameters)
An R6Class
generator object
DEFUSE3Design$new(designParameters, trialParameters, discreteData = FALSE, numberOfSimulations = 5000, rngSeed = 54321, showProgress = TRUE, boundaries)
Create
a new DEFUSE3Design
instance object using the parameters specified. If discreteData
is TRUE
use a discrete distribution for the Rankin scores and designParameters
must contain the appropriate distributions to sample from. If boundaries
is specified, it is used.
getDesignParameters
,getTrialParameters
,
getBoundaries
Accessor methods for (obvious) object slots
setBoundaries
Modifier method for boundaries a
named vector of double values with names btilde
,
b
, and c
, in that order
print()
Print the object in a human readable form
adjustCriticalValues(numberOfSimulations, rngSeed, showProgress)
Adjust the critical values by performing simulations using the parameters provided
computeCriticalValues()
Compute the critical boundary value
explore(numberOfSimulations = 5000, rngSeed = 12345, trueParameters = self$getDesignParameters(), recordStats = TRUE, showProgress = TRUE, saveRawData = FALSE)
Explore the design
using the specified number of simulations and random number seed. trueParameters
is by default the same
as designParameters
as would be the case for a Type I error calculation. If changed, would yield power.
Record statistics, save raw data and show progress if so desired. Returns a list of results
analyze(trialHistory)
Analyze
the design given the trialHistory
which is the result of a call to explore
to
simulate the design. Return a list of summary quantities
summary(analysis)
Print the operating characteristics of the design, using the analysis
result from the analyze
call
Adaptive design of confirmatory trials: Advances and challenges, 2015 45(Pt A):93-102, by Tze Leung Lai and Philip W. Lavori and Ka Wai Tsang. doi:10.1016/j.cct.2015.06.007
ASSISTDesign
which is a superclass of this object
trialParameters <- list(N = c(200, 340, 476), type1Error = 0.025, eps = 1/2, type2Error = 0.1) designParameters <- list( nul0 = list(prevalence = rep(1/6, 6), mean = matrix(0, 2, 6), sd = matrix(1, 2, 6)), alt1 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), c(0.5, 0.4, 0.3, 0, 0, 0)), sd = matrix(1, 2, 6)), alt2 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), c(0.5, 0.5, 0, 0, 0, 0)), sd = matrix(1,2, 6)), alt3 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), rep(0.36, 6)), sd = matrix(1,2, 6)), alt4 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), rep(0.30, 6)), sd = matrix(1,2, 6)), alt5 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), c(0.4, 0.3, 0.2, 0, 0, 0)), sd = matrix(1,2, 6)), alt6 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), c(0.5, 0.5, 0.3, 0.3, 0.1, 0.1)), sd = matrix(1,2, 6))) ## Not run: ## A realistic design uses 5000 simulations or more! defuse3 <- DEFUSE3Design$new(trialParameters = trialParameters, numberOfSimulations = 25, designParameters = designParameters$nul0, showProgress = FALSE) print(defuse3) result <- defuse3$explore(showProgress = interactive()) analysis <- defuse3$analyze(result) print(defuse3$summary(analysis)) ## End(Not run) ## For full examples, try: ## browseURL(system.file("full_doc/defuse3.html", package="ASSISTant"))
trialParameters <- list(N = c(200, 340, 476), type1Error = 0.025, eps = 1/2, type2Error = 0.1) designParameters <- list( nul0 = list(prevalence = rep(1/6, 6), mean = matrix(0, 2, 6), sd = matrix(1, 2, 6)), alt1 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), c(0.5, 0.4, 0.3, 0, 0, 0)), sd = matrix(1, 2, 6)), alt2 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), c(0.5, 0.5, 0, 0, 0, 0)), sd = matrix(1,2, 6)), alt3 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), rep(0.36, 6)), sd = matrix(1,2, 6)), alt4 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), rep(0.30, 6)), sd = matrix(1,2, 6)), alt5 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), c(0.4, 0.3, 0.2, 0, 0, 0)), sd = matrix(1,2, 6)), alt6 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), c(0.5, 0.5, 0.3, 0.3, 0.1, 0.1)), sd = matrix(1,2, 6))) ## Not run: ## A realistic design uses 5000 simulations or more! defuse3 <- DEFUSE3Design$new(trialParameters = trialParameters, numberOfSimulations = 25, designParameters = designParameters$nul0, showProgress = FALSE) print(defuse3) result <- defuse3$explore(showProgress = interactive()) analysis <- defuse3$analyze(result) print(defuse3$summary(analysis)) ## End(Not run) ## For full examples, try: ## browseURL(system.file("full_doc/defuse3.html", package="ASSISTant"))
A data generation function using a discrete distribution for Rankin score rather than a normal distribution
generateDiscreteData(prevalence, N, support = 0L:6L, ctlDist, trtDist)
generateDiscreteData(prevalence, N, support = 0L:6L, ctlDist, trtDist)
prevalence |
a vector of group prevalences (length denoted by J below) |
N |
the sample size to generate |
support |
the support values of the discrete distribution (length K), default 0:6 |
ctlDist |
a probability vector of length K denoting the Rankin score distribution for control. |
trtDist |
an K x J probability matrix with each column is the Rankin distribution for the associated group |
a three-column data frame of subGroup
, trt
(0 or 1), and score
# Simulate data from a discrete distribution for the Rankin scores, # which are typically ordinal integers from 0 to 6 in the following # simulations. So we define a few scenarios. library(ASSISTant) null.uniform <- rep(1, 7L) ## uniform on 7 support points hourglass <- c(1, 2, 2, 1, 2, 2, 1) inverted.hourglass <- c(2, 1, 1, 2, 1, 1, 2) bottom.heavy <- c(2, 2, 2, 1, 1, 1, 1) bottom.heavier <- c(3, 3, 2, 2, 1, 1, 1) top.heavy <- c(1, 1, 1, 1, 2, 2, 2) top.heavier <- c(1, 1, 1, 2, 2, 3, 3) ctlDist <- null.uniform trtDist <- cbind(null.uniform, null.uniform, hourglass, hourglass) ## 4 groups generateDiscreteData(prevalence = rep(1, 4), N = 10, ctlDist = ctlDist, trtDist = trtDist) ## default support is 0:6 trtDist <- cbind(bottom.heavy, bottom.heavy, top.heavy, top.heavy) generateDiscreteData(prevalence = rep(1, 4), N = 10, ctlDist = ctlDist, trtDist = trtDist) support <- c(-2, -1, 0, 1, 2) ## Support of distribution top.loaded <- c(1, 1, 1, 3, 3) ## Top is heavier ctl.dist <- c(1, 1, 1, 1, 1) ## null on 5 support points trt.dist <- cbind(ctl.dist, ctl.dist, top.loaded) ## 3 groups generateDiscreteData(prevalence = rep(1, 3), N = 10, support = support, ctlDist = ctl.dist, trtDist = trt.dist)
# Simulate data from a discrete distribution for the Rankin scores, # which are typically ordinal integers from 0 to 6 in the following # simulations. So we define a few scenarios. library(ASSISTant) null.uniform <- rep(1, 7L) ## uniform on 7 support points hourglass <- c(1, 2, 2, 1, 2, 2, 1) inverted.hourglass <- c(2, 1, 1, 2, 1, 1, 2) bottom.heavy <- c(2, 2, 2, 1, 1, 1, 1) bottom.heavier <- c(3, 3, 2, 2, 1, 1, 1) top.heavy <- c(1, 1, 1, 1, 2, 2, 2) top.heavier <- c(1, 1, 1, 2, 2, 3, 3) ctlDist <- null.uniform trtDist <- cbind(null.uniform, null.uniform, hourglass, hourglass) ## 4 groups generateDiscreteData(prevalence = rep(1, 4), N = 10, ctlDist = ctlDist, trtDist = trtDist) ## default support is 0:6 trtDist <- cbind(bottom.heavy, bottom.heavy, top.heavy, top.heavy) generateDiscreteData(prevalence = rep(1, 4), N = 10, ctlDist = ctlDist, trtDist = trtDist) support <- c(-2, -1, 0, 1, 2) ## Support of distribution top.loaded <- c(1, 1, 1, 3, 3) ## Top is heavier ctl.dist <- c(1, 1, 1, 1, 1) ## null on 5 support points trt.dist <- cbind(ctl.dist, ctl.dist, top.loaded) ## 3 groups generateDiscreteData(prevalence = rep(1, 3), N = 10, support = support, ctlDist = ctl.dist, trtDist = trt.dist)
A data generation function along the lines of what was used in the Lai, Lavori, Liao paper. score rather than a normal distribution
generateNormalData(prevalence, N, mean, sd)
generateNormalData(prevalence, N, mean, sd)
prevalence |
a vector of group prevalences (length denoted by J below) |
N |
the sample size to generate |
mean |
a 2 x J matrix of means under the null (first row) and alternative for each group |
sd |
a 2 x J matrix of standard deviations under the null (first row) and alternative for each group |
a three-column data frame of subGroup
, trt
(0 or 1), and score
In the three stage design under consideration, the groups are nested with assumed prevalences and fixed total sample size at each stage. This function returns the sample size for a specified group at a given stage, where the futility stage for the overall group test may be specified along with the chosen subgroup.
groupSampleSize(prevalence, N, stage, group, HJFutileAtStage = NA, chosenGroup = NA)
groupSampleSize(prevalence, N, stage, group, HJFutileAtStage = NA, chosenGroup = NA)
prevalence |
the vector of prevalence, will be normalized if not already so. The length of this vector implicitly indicates the number of groups J. |
N |
an integer vector of length 3 indicating total sample size at each of the three stages |
stage |
the stage of the trial |
group |
the group whose sample size is desired |
HJFutileAtStage |
is the stage at which overall futility
occured. Default |
chosenGroup |
the selected group if HJFutilityAtStage is not
|
the sample size for group
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). http://www.sciencedirect.com/science/article/pii/S1551714414001311
A list of design and trial design settings used for analysis and simulations in the Lai, Lavori, Liao paper displayed in Tables 1 and 2. The elements of the list are the following
the sample size at each of three interim looks, the last being the final one; The length of this also determines the number of interim looks
the overall type I error
the fraction of type I error spent at each interim look
the type II error desired
A list of the 10 settings used in the simulations named S0
, S1
, ...,
S10
as in the paper, each with three elements
a matrix of means, the first row for the null setting,
the second for the alternative
a matrix of standard deviations, the first row for the
null setting, the second for the alternative
A list of two elements with prevalence vectors used in the paper; the lengths of these vectors implicitly define the number of groups.
a vector of equal prevalences for six groups used in table 1
a vector of prevalences used in table 2 of the paper
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). http://www.sciencedirect.com/science/article/pii/S1551714414001311
Compute the efficacy boundary (modified Haybittle-Peto) for the first two stages
mHP.b(prevalence, N, cov.J, mu.prime, Sigma.prime, alpha, btilde, theta)
mHP.b(prevalence, N, cov.J, mu.prime, Sigma.prime, alpha, btilde, theta)
prevalence |
the vector of prevalences between 0 and 1 summing
to 1. |
N |
a three-vector of total sample size at each stage |
cov.J |
the 3 x 3 covariance matrix for Z_J at each of the three stages |
mu.prime |
a list of |
Sigma.prime |
a list of |
alpha |
the amount of type I error to spend |
btilde |
the futility boundary |
theta |
the effect size on the probability scale |
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). http://www.sciencedirect.com/science/article/pii/S1551714414001311
The futility boundary is computed by
solving (under the alternative)
mHP.btilde(beta, cov.J)
mHP.btilde(beta, cov.J)
beta |
the type II error |
cov.J |
the 3 x 3 covariance matrix |
where the superscripts denote the stage and is the
fraction of the type I error (
) spent and
is the type II error. We make use of the joint normal density of
(the overall group) at each of the three stages and the
fact that the
is merely a translation of
. So here the calculation is based on a mean of zero and
has to be translated during use!
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). http://www.sciencedirect.com/science/article/pii/S1551714414001311
Compute the efficacy boundary (modified Haybittle-Peto) for the final (third) stage
mHP.c(prevalence, N, cov.J, mu.prime, Sigma.prime, alpha, btilde, b, theta)
mHP.c(prevalence, N, cov.J, mu.prime, Sigma.prime, alpha, btilde, b, theta)
prevalence |
the vector of prevalences between 0 and 1 summing
to 1. |
N |
a three-vector of total sample size at each stage |
cov.J |
the 3 x 3 covariance matrix for Z_J at each of the three stages |
mu.prime |
a list of |
Sigma.prime |
a list of |
alpha |
the amount of type I error to spend |
btilde |
the futility boundary |
b |
the efficacy boundary for the first two stages |
theta |
the effect size on the probability scale |
Adaptive Choice of Patient Subgroup for Comparing Two Treatments by Tze Leung Lai and Philip W. Lavori and Olivia Yueh-Wen Liao. Contemporary Clinical Trials, Vol. 39, No. 2, pp 191-200 (2014). http://www.sciencedirect.com/science/article/pii/S1551714414001311
We compute the standardized Wilcoxon test statistic with mean 0 and
and standard deviation 1 for samples and
. The R function
stats::wilcox.test()
returns the statistic
wilcoxon(x, y, theta = 0)
wilcoxon(x, y, theta = 0)
x |
a sample numeric vector |
y |
a sample numeric vector |
theta |
a value > 0 but < 1/2. |
where are the ranks of the first sample
of size
. We compute
where is the alternative hypothesis shift on the
probability scale, i.e.
.
the standardized Wilcoxon statistic