Symmetrical in log-scale [Power / Sample Size]

posted by BE-proff – 2017-07-24 13:42 (2900 d 19:18 ago) – Posting: # 17599
Views: 8,882

Hi Helmut,

Many thanks for clarification! :clap:

Could you please tell how to add study design to :confused:
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:

UA Flag
Activity
 Admin contact
23,425 posts in 4,928 threads, 1,683 registered users;
34 visitors (0 registered, 34 guests [including 7 identified bots]).
Forum time: 09:00 CEST (Europe/Vienna)

You can do one of two things; just shut up,
which is something I don’t find easy,
or learn an awful lot very fast,
which is what I tried to do.    Jane Fonda

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5