Description Usage Arguments Value Author(s) References See Also Examples
PerforIItoIIIRe
calculates the mean and median power in a Phase III
trials from the output of AnIItoIIIRe
.
1 |
t |
Dataframe containing the output from the function |
Dataframe.
Arsenio Nhacolo
Nhacolo, A. and Brannath, W. Using Estimates from Adaptive Phase II Oncology Trials to Plan Phase III Trials. In press.
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 | ## Not run:
rslt <- read.csv("ResultsAll.csv")
rsltfull <- rslt
rslt <- rslt[rslt$suco==1,]
rslt <- rslt[,c("pi0", "pi1", "spi1", "alpha", "beta", "suco", "pip",
"pim1", "pim2", "pim2v2", "pim3")]
rslt <- rslt[rslt$spi1>=rslt$pi0+0.1 & rslt$spi1<=rslt$pi1+0.3,]
rslt$spi1f <- factor(rslt$spi1)
cats <- levels(rslt$spi1f)
ncats <- length(cats)
setwd(paste0("C:/Users/arsenio/Documents/PhD/Simulations/Paper2/Reuse/pi01by0.01/50000/",did))
save(ncats,file = "ncats.rdata")
for (i in 1:ncats){
sr <- rslt[rslt$spi1f==cats[i],]#Single result (result of a specific spi1)
save(sr,file = paste0("sr",i,".rdata"))
}
load("ncats.rdata")
PerfAll <- data.frame()
for (k in 1:ncats){
load(paste0("sr",k,".rdata"))
sre <- AnIItoIIIRe(rslt = sr,f = c(.95,.96,.97,.98,.99))
PerfAll <- rbind(PerfAll,PerforIItoIIIRe(sre))
rm(sr)
}
write.csv(PerfAll, file = "PerfAllIItoIII.csv", row.names = F)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.