SimEfftoxUt: Simulates trial replications from the Efftox model with...

Description Usage Arguments Value Examples

View source: R/SimEfftoxUt.R

Description

Simulates replications from a Bayesian adaptive phase 12 clinical trial design using the Efftox model and a optimality function based on mean utility. Does not assign patient cohorts to unacceptably toxic or inefficous dose levels.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
SimEfftoxUt(
  NSims,
  Dose,
  PE,
  PT,
  corET,
  Nmax,
  cohort,
  UT,
  CutE,
  CutT,
  AcceptE,
  AcceptT,
  HypermeansEFF,
  HypervarsEFF
)

Arguments

NSims

Number of trial simulations to run.

Dose

Logarithm of raw dose levels - the average logarithm of the raw dose levels.

PE

True efficacy probability for each dose.

PT

True toxicity probaiblity for each dose.

corET

Correlation parameter between efficacy and toxicity probability.

Nmax

Maximum trial sample size.

cohort

Patient cohort size.

UT

Utility matrix for the four bivariate (efficacy, toxicity) events.

CutE

Cutoff for efficacy probability acceptability. Dose-efficacy probabilities must be larger than this for patient assignment.

CutT

Cutoff for toxicity probability acceptability. Dose-toxicity probabilities must be smaller than this for patient assignment.

AcceptE

Posterior probability threshold for efficacy acceptability.

AcceptT

Posterior probability threshold for toxicity acceptability.

HypermeansEFF

Hypermeans for the Efftox model. In order, entries are hypermeans for (beta_0,E,beta_1,E,beta_2,E,beta_0,T,beta_1,T,psi).

HypervarsEFF

Hypervariances for the Efftox model. In order, entries are hypervariances for (beta_0,E,beta_1,E,beta_2,E,beta_0,T,beta_1,T,psi).

Value

A list with the first entry corresponding to a matrix with: (1) True toxicity probabilities at each dose, (2) True efficacy probabilities at each dose, (3) True mean utility of each dose, (4) Optimal dose selection probability, (5) Average sample size of patients treated at each dose. The second entry of the list contains a vector with rows corresponding to (1) the true binary bivariate correlation between efficacy and toxicity, (2) Stopping probability of the trial, (3) Average number of efficacy events, (4) Average number of toxicity events, and (5) Delta.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
library(mvtnorm)
##True toxicity probability
PT=c(.05,.10,.15,.20,.30)
##True Efficacy Probability
PE=c(.2,.4,.6,.65,.7)
#True Correlation
corET=.5
##Number of simulations
NSims=1 ##Increase this when using
##Hypermeans and hypervariances
HypermeansEFF = c(.022,3.45,0,-4.23,3.1,0)
HypervarsEFF = c(2.6761, 2.6852, .2, 3.1304, 3.1165, 1)
HypervarsEFF=HypervarsEFF^2
##Trial Parameters
##Cohort Size, N^F and N_ET
cohort=3
##Starting Dose
DoseStart=1
##Vector of Numerical Doses
Dose = c(1,2,3,3.5,5)
##Dose for Eff-Tox
Dose=log(Dose)-mean(log(Dose))
Nmax=30 ##Max Sample Size
#Acceptability Criterion
CutE=.3
CutT=.4
##Limits on acceptability
AcceptE=.1
AcceptT=.1
##UTILITY Matrix
UT = matrix(c(38.23529,100,0,61.76471),nrow=2,byrow=TRUE)
RESULTS=SimEfftoxUt(NSims, Dose,PE,  PT, corET,
Nmax, cohort, UT, CutE, CutT, AcceptE,AcceptT,  HypermeansEFF, HypervarsEFF)
RESULTS

Phase12Compare documentation built on July 31, 2020, 5:07 p.m.