PerformanceEKOAD: Performance of estimation methods

Description Usage Arguments Value Author(s) References See Also Examples

Description

PerformanceEKOAD calculates performance measures (bias, mean square error, coverage probability) of the estimation methods based on the results produced by AnalyzeEKOAD.

Usage

1

Arguments

basedir

The base directory containing the file with the results (Results.csv). If NULL (default), the current working directory is uded.

Value

A dataframe with the performance results. A copy is saved in the file the PerformanceResults.csv in the basedir.

Author(s)

Arsenio Nhacolo

References

Nhacolo, A. and Brannath, W. Interval and point estimation in adaptive Phase II trials with binary endpoint. Stat Methods Med Res, 2018.

See Also

SimulateEKOAD, AnalyzeEKOAD.

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
## Not run: 
#SIMULATIONS
for (did in c(6,10)){#Design ID
cat("============================ Design ",did," ============================\n")
repl <- 50000 # number of replicated trials for each p
dir.create(as.character(did))
setwd(as.character(did))
design <- EKOADwn[EKOADwn$id==did,]
seed = 3343
if (file.exists("PerforAll.csv")) unlink("PerforAll.csv")
piv <- seq(0,1,0.025) # p to simulate data
resul <- data.frame()
perf <- data.frame()
k <- 0
pl <- length(piv)
for (pi in piv){
  k <- k+1
  cat("_________________________ pi = ",pi, " (",k," of ",pl,") _________________________\n",sep = "")
  SimulateEKOAD(replicates = repl, dsgn = design, newpi1 = pi, seed = seed)
  resul <- rbind(resul, AnalyzeEKOAD())
  perf <- rbind(perf, PerformanceEKOAD())
}
write.table(resul, file ="ResultsAll.csv", sep = ",", row.names = F, col.names = TRUE)
write.table(perf, file ="PerforAll.csv", sep = ",", row.names = F, col.names = TRUE)
cat("Design ID: ", design$id[1], "\nReplicates: ", repl, "\nSeed: ", seed,
    "\nDate last run: ", date(),file = "info.txt", sep = "", append = FALSE)
}

## End(Not run)

arsenionhacolo/InferenceBEAGSD documentation built on May 9, 2019, 4:10 a.m.