# using the defaults:
# partial replicate design, targetpower=80%,
# true assumed ratio = 0.90, 1E+5 simulated studies
# ABE limits, PE constraint 0.8 - 1.25
# EMA regulatory settings
# compare results
# \donttest{
CV <- 0.4
method <- c("exact", "abel", "hyslop", "fda")
res <- data.frame(SABE_test = c("ncTOST", "ABEL",
"Hyslop", "FDA"),
n = NA, power = NA)
for (i in 1:nrow(res)) {
res[i, 2:3] <- sampleN.RSABE2L.sdsims(CV = CV,
SABE_test = method[i],
details = FALSE,
print = FALSE)[8:9]
}
print(res, digits = 4, row.names = FALSE)# }
# should result in a sample size n=48 with all methods,
# power=0.8197 (ncTOST), 0.8411 (ABEL), 0.8089 (Hyslop), 0.8113 (FDA)
Run the code above in your browser using DataLab