SimTrial {SubTite} | R Documentation |
Simulates a Sub-TITE trial design
Description
Simulates replicates from a Sub-TITE trial with user specified true toxicity time distributions for different doses and subgroups and returns average summary statistics of the trial.
Usage
SimTrial(
nSims,
Nmax,
T1,
Target,
Dose,
DoseStart,
Upper,
Accrue,
groupprob,
meanmu,
meanslope,
MeanInts,
MeanSlopes,
VarInt,
VarSlope,
phetero,
Family,
SimTruth,
NSep,
NBorrow,
cohort,
FULL
)
Arguments
nSims |
Number of Trials to Simulate. |
Nmax |
Maximum Number of Patients to enroll in the trial. |
T1 |
Reference time for toxicity. |
Target |
Target cumulative toxicity probability (or subgroup specific vector) at time T1. |
Dose |
Standardized vector of doses to try. |
DoseStart |
Dose (or vector of Doses) to enroll the first patient in each subgroup at. |
Upper |
Cutoff values used to determine if accrual in a subgroup should be suspended. |
Accrue |
Expected montly patient accrual rate. |
groupprob |
Probability vector of subgroup assignment. |
meanmu |
Prior mean of the baseline intercept parameter. |
meanslope |
Prior mean of the baseline slope parameter. |
MeanInts |
G-1 length vector of subgroup specific prior intercept means. |
MeanSlopes |
G-1 length vector of subgroup specific prior slope means. |
VarInt |
Prior Variance of Intercept Parameters. |
VarSlope |
Prior Variance of Slope Parameters. |
phetero |
Prior probability of clustering |
Family |
What distribution Family to simulate from. Options include: Exponential,Gamma, Lognormal, Uniform, Weibull. |
SimTruth |
List of 2 #Groups by #Doses matrices containing the true parameter values needed for simulating from different true time to toxicity distributions. When a Uniform distribution is chosen, the user will instead supply the true toxicity probabilities for each dose/subgroup combination in both list entries. For a gamma distribution, the user will supply a matrix for the shape parameters for each dose and subgroup, and a second matrix for the rate parameters of each dose and subgroup. |
NSep |
Number of patients to assign based on no borrowing. |
NBorrow |
Number of patients to assign based on no clustering |
cohort |
Number of patients to enroll before escalating. |
FULL |
Do we have to fully evaluate a cohort before escalating? |
Value
A list with first entry corresponding to summaries of the operating characteristics of the design including
Examples
##Note: nSims should be set larger than the example below.
nSims=1
###TRIAL PARAMETERS###
##Specify reference toxicity time and target
T1=6
Target=.3
##Number of Groups
##Specify upper bound for determining if the lowest dose is too toxic in a subgroup
Upper=c(.95,.95)
#' ##Standardized Dose Values and starting dose index
Dose=sort(rnorm(5))
DoseStart=1
##Maximum Sample Size
Nmax=25
##Number of patients to run separately
NSep=0
##Number of patients to borrow, but NOT cluster
NBorrow=0
##Number of patients to fully evaluate or TREAT before ESCALATING
cohort=3
##Do we fully evaluate a cohort before escalating?
FULL=0
#HYPERPARAMETERS#
##Hypermeans for baseline terms
meanmu=2.21
meanslope=-.57
##Hypervectors for subgroup specific terms
MeanInts = c(0,.46)
MeanSlopes = c(0,.04)
##Hypervariances
VarInt=5
VarSlope=1
######SIMULATION TRUTH####
##True Accrual Rate
Accrue=2
##True Distribution of subgroups
groupprob=c(.5,.5)
##True Group Toxicity probabilities at each dose level
GroupProb =matrix(c(.05,.3,.6,.7,.8,.01,.02,.13,.27,.5),nrow=2,byrow=TRUE)
##True Simulation distribution
Family="Uniform"
SimTruth = as.list(c(0,0))
SimTruth[[1]]=GroupProb
SimTruth[[2]]=GroupProb
phetero=.9
RESULTS=SimTrial(nSims,Nmax,T1,Target,Dose,DoseStart,
Upper,Accrue,groupprob,meanmu,meanslope,
MeanInts,MeanSlopes,VarInt,VarSlope,phetero,
Family,SimTruth,NSep,NBorrow,cohort,FULL)
RESULTS[[1]]