| ASSISTDesign {ASSISTant} | R Documentation |
A class to encapsulate the adaptive clinical trial design of Lai, Lavori and Liao
Description
ASSISTDesign objects are used to design, simulate and analyze
adaptive group sequential clinical trial with three stages. For details refer to 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).
Methods
Public methods
Method new()
Create a new ASSISTDesign instance using the parameters specified.
Usage
ASSISTDesign$new( designParameters, trialParameters, discreteData = FALSE, 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
boundariesdecision boundaries to use for interim looks, a named vector of
btilde,bandcvalues
Returns
a new AssistDesign object
Method getDesignParameters()
return the designParameters field
Usage
ASSISTDesign$getDesignParameters()
Method getTrialParameters()
return the trialParameters field
Usage
ASSISTDesign$getTrialParameters()
Method getBoundaries()
return the boundaries field
Usage
ASSISTDesign$getBoundaries()
Method setBoundaries()
Set the boundaries field
Usage
ASSISTDesign$setBoundaries(value)
Arguments
valuea named vector of
btilde,bandcvalues
Method print()
Print details of the design to console
Usage
ASSISTDesign$print()
Method computeCriticalValues()
Compute the critical boundary values \tilde{b}, b and c for futility, efficacy and final efficacy decisions. This is time consuming so cache where possible.
Usage
ASSISTDesign$computeCriticalValues()
Returns
a named vector of critical values with names btilde, b, and c as in the paper
Method explore()
Explore the design using the specified number of simulations and random number seed and other parameters.
Usage
ASSISTDesign$explore( numberOfSimulations = 5000, rngSeed = 12345, trueParameters = self$getDesignParameters(), recordStats = TRUE, showProgress = TRUE, fixedSampleSize = FALSE, 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
TRUEfixedSampleSizea bollean flag indicating that patients lost after a futile overall look are not made up, default
FALSE.saveRawDataa flag (default
FALSE) to indicate if raw data has to be saved
Returns
a list of results
Method performInterimLook()
Perform an interim look on trial data
Usage
ASSISTDesign$performInterimLook( trialData, stage, recordStats = FALSE, fixedSampleSize = FALSE )
Arguments
trialDatatrial data frame
stagethe trial stage
recordStatsa boolean flag to record all statistics
fixedSampleSizea flag to use a fixed sample size to account for loss to follow up
Returns
the trial history
Method analyze()
Analyze the exploration data from trial
Usage
ASSISTDesign$analyze(trialExploration)
Arguments
trialExplorationthe result of a call to
explore()to simulate the design
Returns
Return a list of summary quantities
Method summary()
Print the operating characteristics of the design using the analysis data
Usage
ASSISTDesign$summary(analysis)
Arguments
analysisthe analysis result from the
analyze()call
Method clone()
The objects of this class are cloneable with this method.
Usage
ASSISTDesign$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
LLL.SETTINGS for an explanation of trial parameters
Examples
## 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)
result <- designA$explore(showProgress = interactive())
analysis <- designA$analyze(result)
designA$summary(analysis)
## End(Not run)