| DEFUSE3Design {ASSISTant} | R Documentation |
The DEFUSE3 design
Description
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.
Super class
ASSISTant::ASSISTDesign -> DEFUSE3Design
Methods
Public methods
Inherited methods
ASSISTant::ASSISTDesign$analyze()ASSISTant::ASSISTDesign$computeCriticalValues()ASSISTant::ASSISTDesign$getBoundaries()ASSISTant::ASSISTDesign$getDesignParameters()ASSISTant::ASSISTDesign$getTrialParameters()ASSISTant::ASSISTDesign$print()ASSISTant::ASSISTDesign$setBoundaries()ASSISTant::ASSISTDesign$summary()
Method getOriginalBoundaries()
Return the original boundaries for the design
Usage
DEFUSE3Design$getOriginalBoundaries()
Returns
a named vector of values for b, btilde and c
Method new()
Create a DEFUSE3Design object
Usage
DEFUSE3Design$new( designParameters, trialParameters, discreteData = FALSE, numberOfSimulations = 5000, rngSeed = 54321, showProgress = TRUE, trueParameters = NULL, boundaries )
Arguments
designParametersparameters of the experimental design. Must contain apropriate distributions to sample from, if
discreteData = TRUEtrialParametersthe trial parameters, such as sample size etc.
discreteDataa flag indicating that a discrete distribution is to be used for the Rankin scores
numberOfSimulationsthe number of simulations to use, default 5000
rngSeedthe random number generator seed
showProgressa boolean flag to show progress (default
TRUE)trueParametersa list of true parameter values reflecting the state of nature
boundariesdecision boundaries to use for interim looks, a named vector of
btilde,bandcvalues
Returns
a new AssistDesign object
Method adjustCriticalValues()
Adjust critical values to account for sample size loss due to futility
Usage
DEFUSE3Design$adjustCriticalValues(numberOfSimulations, rngSeed, showProgress)
Arguments
numberOfSimulationsthe number of simulations to use
rngSeedthe random number generator seed
showProgressa boolean flag for showing progress
Returns
the adjusted boundaries
Method explore()
Explore the design using the specified number of simulations and random number seed and other parameters.
Usage
DEFUSE3Design$explore( numberOfSimulations = 5000, rngSeed = 12345, trueParameters = self$getDesignParameters(), recordStats = TRUE, showProgress = TRUE, saveRawData = FALSE )
Arguments
numberOfSimulationsdefault number of simulations is 5000
rngSeeddefault seed is 12345
trueParametersthe state of nature, by default the value of
self$getDesignParameters()as would be the case for a Type I error calculation. If changed, would yield power.recordStatsa boolean flag (default
TRUE) to record statisticsshowProgressa boolean flag to show progress, default
TRUEsaveRawDataa flag (default
FALSE) to indicate if raw data has to be saved
Returns
a list of results
Method performInterimLook()
Perform an interim look for futility
Usage
DEFUSE3Design$performInterimLook(trialData, stage, recordStats = FALSE)
Arguments
trialDatatrial data frame
stagethe trial stage
recordStatsa boolean flag to record all statistics
Returns
the trial history
Method clone()
The objects of this class are cloneable with this method.
Usage
DEFUSE3Design$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
ASSISTDesign which is a superclass of this object
Examples
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"))