# NOT RUN {
##Clinical Parameters
nCat = 6
nTreat = 3
UT = c(0,10,20,80,90,100) ###Utilities
DeltaVEC = c(5,10) ###Vector of deltas to try
NLOOK = c(20,50) ###Interim Looks
###Which treatments are active?
ACTIVE = c(1,0,1) ###Treatments 1, 3 are active
FUTILITY = 1 ###Futility look is allowed.
###Design parameters
gamma= c(.5, .05, .05)
PSPIKE = .9
set.seed(1)
##Generate Random Data
n=300
Y=sample(1:nCat,n,replace=TRUE)
T1 = sample(1:nTreat,n,replace=TRUE)
XPROB = as.list(rep(NA,3))
XPROB[[1]]=rbind(0:10,round(dpois(0:10,2),2)) ###CCI
XPROB[[2]]=rbind(c(-1,0,1),c(.5,.4,.1)) ###O2 Status
XPROB[[3]]=rbind(c(-2,-1,0,1),c(.27,.38,.18,.17))
Beta =
###Number of iterations
B=100
##Get Simulation Parameters
#' ##Get Simulation Parameters
PROBS = as.list(rep(NA,3))
PROBS[[1]]=c(.33,.11,.42,.02,.11,.01)
PROBS[[2]]=c(.24,.11,.48,.05,.11,.01)
PROBS[[3]]=c(.14, .20, .48, .03, .12, .03)
Beta=c(-.13, -.07, -.10)
nSims=1 ##Number of sims to run
ADJ=1
SimMABOUST(nSims,NLOOK, nTreat,nCat, UT, DeltaVEC,gamma,PSPIKE,ADJ, B, PROBS, Beta, XPROB)
# }
Run the code above in your browser using DataLab