Title: | Subgroup Specific Optimal Dose Assignment |
---|---|
Description: | Chooses subgroup specific optimal doses in a phase I dose finding clinical trial allowing for subgroup combination and simulates clinical trials under the subgroup specific time to event continual reassessment method. Chapple, A.G., Thall, P.F. (2018) <doi:10.1002/pst.1891>. |
Authors: | Andrew Chapple |
Maintainer: | Andrew Chapple <[email protected]> |
License: | GPL-2 |
Version: | 4.0.5 |
Built: | 2024-11-20 06:26:02 UTC |
Source: | CRAN |
Uses the prior means for the intercept and slope parameters and the number of doses to obtain an approximate prior ESS for the given prior variances. The user should calibrate varint and varbeta with varint>varbeta such that the ESS value is 1.
GetESS( Dose, meanmu, meanslope, MeanInts, MeanSlopes, VarInt, VarSlope, phetero )
GetESS( Dose, meanmu, meanslope, MeanInts, MeanSlopes, VarInt, VarSlope, phetero )
Dose |
Vector containing standardized doses. |
meanmu |
Prior mean for baseline intercept. |
meanslope |
Prior mean for baseline slope. |
MeanInts |
Vector of prior means for the group specific intercept parameters. |
MeanSlopes |
Vector of prior means for the group specific slope parameters. |
VarInt |
Prior variance for the intercept parameters. |
VarSlope |
Prior variance for the slope parameters. |
phetero |
Prior probability of clustering |
Returns the nonlinear regression model whos parameter estimates will be used as prior means for the SubTITE Design.
[1] Chapple and Thall (2017), Subgroup-specific dose finding in phase I clinical trials based on time to toxicity allowing adaptive subgroup combination.
###Specify the prior hypermeans meanmu=-.5 meanslope=-.05 MeanInts = c(0,-.5,-.1) MeanSlopes = c(0,.1,0) Dose=sort(rnorm(5)) VarInt=5 VarSlope=1 phetero=.9 GetESS(Dose,meanmu,meanslope,MeanInts,MeanSlopes,VarInt,VarSlope,phetero)
###Specify the prior hypermeans meanmu=-.5 meanslope=-.05 MeanInts = c(0,-.5,-.1) MeanSlopes = c(0,.1,0) Dose=sort(rnorm(5)) VarInt=5 VarSlope=1 phetero=.9 GetESS(Dose,meanmu,meanslope,MeanInts,MeanSlopes,VarInt,VarSlope,phetero)
Obtains true simulation parameters for each supported distribution function to correspond to a probability of the truth by time T1.
GetParams(Family, ParamNum, Param, GroupProb, T1)
GetParams(Family, ParamNum, Param, GroupProb, T1)
Family |
What distribution Family to simulate from. Options include: Exponential,Gamma, Lognormal, Uniform, Weibull. |
ParamNum |
Parameter index for user set value. For example, ParamNum=1 for a Gamma distribution means that the user will supply the shape parameters in the param matrix. If ParamNum=2, the user will supply the rate parameters in the param matrix. |
Param |
#Groups X #Doses Matrix containing one parameter for each subgroup and dose. |
GroupProb |
#Groups X #Doses Matrix containing the true toxicity probability by time T1. |
T1 |
Toxicity observation window. |
A list containing the hyperparameter matrices to input into the SimTrial function. Also plots the hazard of toxicity for each subgroup and dose.
GroupProb =matrix(c(.05,.3,.6,.7,.8,.01,.02,.13,.27,.5),nrow=2,byrow=TRUE) ##True Simulation distribution Family="Weibull" T1=6 Param = GroupProb*0 + 4 ##Late onset weibull SimTruth = GetParams("Weibull",1,Param,GroupProb,T1)
GroupProb =matrix(c(.05,.3,.6,.7,.8,.01,.02,.13,.27,.5),nrow=2,byrow=TRUE) ##True Simulation distribution Family="Weibull" T1=6 Param = GroupProb*0 + 4 ##Late onset weibull SimTruth = GetParams("Weibull",1,Param,GroupProb,T1)
Uses the clinician elicited prior reference probabilities for each subgroup and dose to obtain prior means for the Bayesian logistic regression model used in the SubTite trial design.
GetPriorMeans(Prior, Dose)
GetPriorMeans(Prior, Dose)
Prior |
#Groups X #Doses matrix containing the elicited prior toxicity probabilities at the reference time for each dose and subgroup. |
Dose |
Vector containing standardized doses. |
Returns the a list containing the nonlinear regression model whos parameter estimates will be used as prior means for the SubTITE Design.
[1] Chapple and Thall (2017), Subgroup-specific dose finding in phase I clinical trials based on time to toxicity allowing adaptive subgroup combination
##Specify elicited reference toxicity probabilities Prior = matrix(c(.2,.3,.4,.5,.6,.1,.2,.3,.4,.5,.05,.1,.15,.2,.3),byrow=TRUE,nrow=3) Dose=sort(rnorm(5)) GetPriorMeans(Prior,Dose)
##Specify elicited reference toxicity probabilities Prior = matrix(c(.2,.3,.4,.5,.6,.1,.2,.3,.4,.5,.05,.1,.15,.2,.3),byrow=TRUE,nrow=3) Dose=sort(rnorm(5)) GetPriorMeans(Prior,Dose)
Returns a list containing the optimal doses to enroll each subgroup at and the subgroups that should have their accrual suspended temporarily.
GetSubTite( Y, I, Doses, Groups, Include = rep(1, length(Y)), ID, cohort, Conservative, T1, Target, Upper, Dose, meanmu, meanslope, MeanInts, MeanSlopes, VarInt, VarSlope, phetero, Borrow, B )
GetSubTite( Y, I, Doses, Groups, Include = rep(1, length(Y)), ID, cohort, Conservative, T1, Target, Upper, Dose, meanmu, meanslope, MeanInts, MeanSlopes, VarInt, VarSlope, phetero, Borrow, B )
Y |
Vector containing observed event or censoring times. |
I |
Vector containing event indicators (1 if patient experiences an event for a patient). |
Doses |
Vector containing numerical doses assigned to patients in the trial. |
Groups |
Vector containing group assignment of patients, 1 is baseline group. |
Include |
Binary vector indicating whether each patient record should be included in the decision making process. |
ID |
Vector of patient IDs. Can be numeric or character valued. |
cohort |
Number of patients needed to be assigned at a dose level prior to escalation. |
Conservative |
Binary Indicator of Whether conservative escalation, i.e. not allowing escalation until cohort patients have been fully evaluated at the highest tried dose level. |
T1 |
Reference time for toxicity. |
Target |
Target cumulative toxicity probability vector at time T1. |
Upper |
Cutoff values used to determine if accrual in a subgroup should be suspended. |
Dose |
Vector containing the standardized doses considered. |
meanmu |
Prior mean for baseline intercept. |
meanslope |
Prior mean for baseline slope. |
MeanInts |
Vector of prior means for the group specific intercept parameters. |
MeanSlopes |
Vector of prior means for the group specific slope parameters. |
VarInt |
Prior variance for the intercept parameters. |
VarSlope |
Prior variance for the slope parameters. |
phetero |
Prior probability of heterogeneous subgroups. |
Borrow |
Parameter to specify subgroup borrowing/clustering. 0=No borrowing, 1=Borrowing but no clustering, 2=Borrowing and clustering. |
B |
Number of Iterations to run for MCMC |
Returns a list with two objects, a vector of optimal doses for each subgroup and matrix of posterior toxicity probabilities at each dose level within each subgroup.
[1] Chapple and Thall (2017), Subgroup Specific Dose Finding in Phase I Clinical Trials Based on Time to Toxicity Within a Fixed Follow Up Period.
T1=28 ##Reference time for toxicity Target=rep(.3,2) ##Target toxicity probability Upper=rep(.95,2) ##Upper cutoffs for excessive toxicity ##How many patients in each subgroup have been assigned at each dose level? cohort=3 ##Cohort size required for escalation Conservative = 1 ##Conservative escalation ##Only can escalate with a fully evaluated cohort at the highest dose level. ##Matrix of umber of patients tried or fully evaluated at each dose level. ##Hyperparameters meanmu=-0.4467184 ##Common Intercept hypermean meanslope= 0.8861634 ##Common slope hypermean MeanInts =c(0, -0.5205379) ##Group Intercept hypermeans MeanSlopes = c(0, 0.1888923) ##Group slope hyperneabs VarInt=5 #Prior Variance of the intercept betas VarSlope=1 ##Prior Variance of slope betas phetero=.9 ##Prior Probability of hetergeneity Borrow=0 ##Borrowing specification, 0=none, 1=some, 2=clustering. B=5000 ##Number of iterations Borrow=2 Y=c(28,26,29,28,29,5,1) RawDose=c(350,420,530,660,825) Dose=(RawDose-mean(RawDose))/sd(RawDose) I <- c(0,0,0,0,0,0,0) Doses <- rep(2,7) Groups <- c(0,1,1,0,0,1,1) Include <- rep(1,7) ID=1:length(Y) Z=GetSubTite(Y, I,Doses, Groups, Include,ID,cohort, Conservative, T1,Target, Upper, Dose, meanmu, meanslope, MeanInts, MeanSlopes ,VarInt,VarSlope,phetero, Borrow,B) Z
T1=28 ##Reference time for toxicity Target=rep(.3,2) ##Target toxicity probability Upper=rep(.95,2) ##Upper cutoffs for excessive toxicity ##How many patients in each subgroup have been assigned at each dose level? cohort=3 ##Cohort size required for escalation Conservative = 1 ##Conservative escalation ##Only can escalate with a fully evaluated cohort at the highest dose level. ##Matrix of umber of patients tried or fully evaluated at each dose level. ##Hyperparameters meanmu=-0.4467184 ##Common Intercept hypermean meanslope= 0.8861634 ##Common slope hypermean MeanInts =c(0, -0.5205379) ##Group Intercept hypermeans MeanSlopes = c(0, 0.1888923) ##Group slope hyperneabs VarInt=5 #Prior Variance of the intercept betas VarSlope=1 ##Prior Variance of slope betas phetero=.9 ##Prior Probability of hetergeneity Borrow=0 ##Borrowing specification, 0=none, 1=some, 2=clustering. B=5000 ##Number of iterations Borrow=2 Y=c(28,26,29,28,29,5,1) RawDose=c(350,420,530,660,825) Dose=(RawDose-mean(RawDose))/sd(RawDose) I <- c(0,0,0,0,0,0,0) Doses <- rep(2,7) Groups <- c(0,1,1,0,0,1,1) Include <- rep(1,7) ID=1:length(Y) Z=GetSubTite(Y, I,Doses, Groups, Include,ID,cohort, Conservative, T1,Target, Upper, Dose, meanmu, meanslope, MeanInts, MeanSlopes ,VarInt,VarSlope,phetero, Borrow,B) Z
Performs MCMC and returns needed values for dose-finding in a list.
MCMC( Y, I, Doses, Groups, T1, Target, Upper, Dose, meanmu, meanslope, MeanInts, MeanSlopes, varint, varbeta, phetero, Stopped, NumPat, SubRout, B )
MCMC( Y, I, Doses, Groups, T1, Target, Upper, Dose, meanmu, meanslope, MeanInts, MeanSlopes, varint, varbeta, phetero, Stopped, NumPat, SubRout, B )
Y |
Vector containing observed event or censoring times. |
I |
Vector containing event indicators (1 if patient experiences an event for a patient). |
Doses |
Vector containing Doses of patients in trial. |
Groups |
Vector containing group assignment of patients, 0 is baseline group. |
T1 |
Reference time for toxicity. |
Target |
Target cumulative toxicity probability vector at time T1. |
Upper |
Cutoff values used to determine if accrual in a subgroup should be suspended. |
Dose |
Vector containing the standardized doses considered. |
meanmu |
Prior mean for baseline intercept. |
meanslope |
Prior mean for baseline slope. |
MeanInts |
Vector of prior means for the group specific intercept parameters. |
MeanSlopes |
Vector of prior means for the group specific slope parameters. |
varint |
Prior variance for the intercept parameters. |
varbeta |
Prior variance for the slope parameters. |
phetero |
Prior probability of heterogeneous subgroups. |
Stopped |
Current vector of STOPPED groups |
NumPat |
Number of patients |
SubRout |
Parameter to specify subgroup borrowing/clustering. 0=No borrowing, 1=Borrowing but no clustering, 2=Borrowing and clustering. |
B |
Number of Iterations to run for MCMC |
A list of quantities needed for determining the next dose to enroll each subgroup.
Performs MCMC and returns needed values for dose-finding in a list.
MCMCSIM( Y, I, Doses, Groups, T1, Target, Upper, Dose, meanmu, meanslope, MeanInts, MeanSlopes, varint, varbeta, phetero, Stopped, NumPat, SubRout, B )
MCMCSIM( Y, I, Doses, Groups, T1, Target, Upper, Dose, meanmu, meanslope, MeanInts, MeanSlopes, varint, varbeta, phetero, Stopped, NumPat, SubRout, B )
Y |
Vector containing observed event or censoring times. |
I |
Vector containing event indicators (1 if patient experiences an event for a patient). |
Doses |
Vector containing Doses of patients in trial. |
Groups |
Vector containing group assignment of patients, 0 is baseline group. |
T1 |
Reference time for toxicity. |
Target |
Target cumulative toxicity probability vector at time T1. |
Upper |
Cutoff values used to determine if accrual in a subgroup should be suspended. |
Dose |
Vector containing the standardized doses considered. |
meanmu |
Prior mean for baseline intercept. |
meanslope |
Prior mean for baseline slope. |
MeanInts |
Vector of prior means for the group specific intercept parameters. |
MeanSlopes |
Vector of prior means for the group specific slope parameters. |
varint |
Prior variance for the intercept parameters. |
varbeta |
Prior variance for the slope parameters. |
phetero |
Prior probability of heterogeneous subgroups. |
Stopped |
Current vector of STOPPED groups |
NumPat |
Number of patients |
SubRout |
Parameter to specify subgroup borrowing/clustering. 0=No borrowing, 1=Borrowing but no clustering, 2=Borrowing and clustering. |
B |
Number of Iterations to run for MCMC |
A matrix of quantities needed for determining the next dose to enroll each subgroup while using the SimTrial function.
Gives summaries of GetSubTite Objects.
Print_SubTite(Z)
Print_SubTite(Z)
Z |
List produced by GetSubTite. |
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.
SimTrial( nSims, Nmax, T1, Target, Dose, DoseStart, Upper, Accrue, groupprob, meanmu, meanslope, MeanInts, MeanSlopes, VarInt, VarSlope, phetero, Family, SimTruth, NSep, NBorrow, cohort, FULL )
SimTrial( nSims, Nmax, T1, Target, Dose, DoseStart, Upper, Accrue, groupprob, meanmu, meanslope, MeanInts, MeanSlopes, VarInt, VarSlope, phetero, Family, SimTruth, NSep, NBorrow, cohort, FULL )
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? |
A list with first entry corresponding to summaries of the operating characteristics of the design including
##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]]
##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]]
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.
SimTrial1( nSims, Nmax, T1, Target, Dose, DoseStart, Upper, Accrue, groupprob, Family, Param1, Param2, meanmu, meanslope, MeanInts, MeanSlopes, varint, varbeta, phetero, NSep, NBorrow, cohort, FULLY )
SimTrial1( nSims, Nmax, T1, Target, Dose, DoseStart, Upper, Accrue, groupprob, Family, Param1, Param2, meanmu, meanslope, MeanInts, MeanSlopes, varint, varbeta, phetero, NSep, NBorrow, cohort, FULLY )
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. |
Family |
What distribution Family to simulate from. Options include: Exponential,Gamma, Lognormal, Uniform, Weibull. |
Param1 |
nGroups X nDose matrix of first parameter values. |
Param2 |
NGroups X nDose matrix of second parameter values. |
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. |
varbeta |
Prior Variance of Slope Parameters. |
phetero |
Prior prob of heterogeneity. |
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. |
FULLY |
Do we have to fully evaluate a cohort before escalating? |
A list of simulation outputs to be processed in R.