RandomEffTox {Phase123} | R Documentation |
This function returns a random acceptable dose number to assign the next patient cohort or stops the trial if no dose is deemed acceptable.
RandomEffTox(YE, YT, Doses, Dose, DosesTried, Hypermeans, Hypervars, Contour, PiLim, ProbLim, B)
YE |
Vector containing observed efficacy indicators. |
YT |
Vector containing observed toxicity indicators. |
Doses |
Vector containing numbered Doses of patients in trial. |
Dose |
Vector containing the standardized doses considered. |
DosesTried |
Binary vector corresponding to which doses have been tried. |
Hypermeans |
Vector containing prior hypermeans of length 6 for Eff-Tox parameters. |
Hypervars |
Vector containing prior hypervariances of length 6 for Eff-Tox parameters. |
Contour |
Vector containing 4 entries used to make the desireability function. Contour[1] contains a desired toxicity probability given efficacy, Countour[2] contains a desired efficacy probability given toxicity, and (Contour[3],Contour[4]) is an equally desireable pair of efficacy and toxicity probabilities that are non-zero or one. |
PiLim |
Vector of length two with PiLim[1] containing the acceptable lower limit on efficacy probability and PiLim[2] containing the acceptable upper limit on toxicity probability. |
ProbLim |
Vector of length two with ProbLim[1] containing the probability cutoff for acceptable efficacy probability and ProbLim[2] containing the probability cutoff for acceptable toxicity probability. |
B |
Number of iterations to perform in the MCMC. |
A random dose level to administer the next patient cohort.
##Doses, YE,YT Doses= c(1,1,1,2,2,2,1,1,1,3,3,3,1,1,1,2,2,2) YE = c(0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0) YT=c(0,0,0,1,1,0,1,0,0,1,1,1,0,0,0,1,0,0) ##Vector of Numerical Doses Dose = c(1,2,3,3.5,5) Dose=(Dose-mean(Dose))/sd(Dose) ##Five doses, but only 3 tried so we have DosesTried=c(1,1,1,0,0) ## Contour Vector Contour = c(.35, .75,.7,.4) ##Hypermeans Hypermeans = c(.022,3.45,0,-4.23,3.1,0) Hypervars = c(2.6761, 2.6852, .2, 3.1304, 3.1165, 1) Hypervars=Hypervars^2 ##Acceptability Criteria PiLim = c(.3,.4) ProbLim=c(.1,.1) ##Number of iterations B=2000 RandomEffTox(YE,YT, Doses, Dose, DosesTried, Hypermeans, Hypervars, Contour, PiLim, ProbLim, B )