# NOT RUN {
# }
# NOT RUN {
###############################################
#### A simple example using a simple data #####
###############################################
vanGroeningen <- rbind(c(25,0/6, 6), c(35, 0/5,5), c(40, 4/11, 11), c(45, 3/5, 5))
Hoff <- rbind(c(30, 3/9, 9), c(35, 2/3, 3), c(40, 2/3, 3))
Zhu <- rbind(c(30, 0/12, 12), c(35, 2/3, 3))
dataTox <- rbind(vanGroeningen, Hoff, Zhu)
dataTox <- data.frame(dataTox)
colnames(dataTox) <- c("doses", "proba", "nbPatients")
nbTox <- dataTox$proba*dataTox$nbPatients
dataTox <- data.frame(dataTox, nbTox)
doses <- c(25, 30, 35, 40, 45)
nbSimu <- 10
zko <- ZKO(dataTox, doses, target = 0.3, dr = c(0.05, 0.15, 0.2, 0.3, 0.35), nbSimu)
###########################################################################
################ A second example using the data "Toxdata" ################
################### included in the "dfmeta" R package ####################
###########################################################################
data(Toxdata)
pos <- which(Toxdata$simulation == 0)
dataTox2 <- Toxdata[pos, ]
dataTox2 <- dataTox2[, c(2,6,4,5)]
### Remember that the structure of the database must be in the following structure ###
colnames(dataTox2) <- c("doses", "proba", "nbPatients", "nbTox")
doses <- 0:5
nbSimu <- 10
zko2 <- ZKO(dataTox2, doses, target = 0.3, dr = c(0.05, 0.15, 0.2, 0.3, 0.35, 0.45),
nbSimu)
# }
Run the code above in your browser using DataLab