Symmetrical in log-scale [Power / Sample Size]
Hi Helmut,
Many thanks for clarification!
Could you please tell how to add study design to
Many thanks for clarification!

Could you please tell how to add study design to

library(PowerTOST)
CV <- 0.26
theta0 <- seq(0.85, 1.20, 0.05)
thetas <- length(theta0)
target <- c(0.8, 0.9)
result <- data.frame(CV=rep(CV, thetas), GMR=sprintf("%.4f", theta0),
n1=rep(NA, thetas), pwr1=rep(NA, thetas),
n2=rep(NA, thetas), pwr2=rep(NA, thetas))
names(result)[3:6] <- rep(c("n", "power"), 2)
for (j in seq_along(theta0)) {
x1 <- sampleN.TOST(CV=CV, theta0=theta0[j],
targetpower=target[1], print=F)
x2 <- sampleN.TOST(CV=CV, theta0=theta0[j],
targetpower=target[2], print=F)
result[j, 3] <- x1[["Sample size"]]
result[j, 4] <- sprintf("%.2f%%", 100*x1[["Achieved power"]])
result[j, 5] <- x2[["Sample size"]]
result[j, 6] <- sprintf("%.2f%%", 100*x2[["Achieved power"]])
}
print(result, row.names=FALSE)
Complete thread:
- How to create table of results BE-proff 2017-07-20 14:09 [Power / Sample Size]
- How to create table of results ElMaestro 2017-07-20 14:32
- How to create table of results BE-proff 2017-07-20 15:02
- How to create table of sample sizes / powers Helmut 2017-07-20 15:18
- How to create table of sample sizes / powers BE-proff 2017-07-20 16:00
- Symmetrical in log-scale Helmut 2017-07-20 17:12
- Symmetrical in log-scaleBE-proff 2017-07-24 11:42
- RTFM Helmut 2017-07-24 18:18
- Symmetrical in log-scaleBE-proff 2017-07-24 11:42
- Symmetrical in log-scale Helmut 2017-07-20 17:12
- How to create table of sample sizes / powers BE-proff 2017-07-20 16:00
- How to create table of results ElMaestro 2017-07-20 14:32