Danish ultra-conservatism [Power / Sample Size]

posted by Helmut Homepage – Vienna, Austria, 2017-02-08 11:47  – Posting: # 17039
Views: 19,451

Dear Detlew,

» Side effect 2:
» The Danish are ultra-conservative!

Confirmed. Try this one:

dk <- function(CV, n, lower, upper, theta0) { # Danish power
        p0 <- power.TOST(CV=CV, n=n, theta0=theta0,
                         theta1=lower, theta2=upper)
        p1 <- power.TOST(CV=CV, n=n, theta0=theta0,
                         theta1=lower, theta2=1)
        p2 <- power.TOST(CV=CV, n=n, theta0=theta0,
                         theta1=1, theta2=upper)
of <- function(x) { # objective function
        (dk(CV=CV, n=n, lower=lower, upper=upper, theta0=x)-target)^2
lower  <- 0.9 # NTID-range
upper  <- 1/lower
CV     <- 0.1
target <- 0.8
theta0 <- 0.9
n      <- 22 # fixed
theta0.dk <- optimize(of, interval=c(lower, 1), tol=1e-12)$minimum
power  <- dk(CV=CV, n=n, lower=lower, upper=upper, theta0=theta0.dk)
pwr.1  <- dk(CV=CV, n=n, lower=lower, upper=upper, theta0=theta0)
GMR    <- seq(lower, upper, length.out=101)
pwr    <- vector()
for (j in seq_along(GMR)) {
  pwr[j] <- dk(CV=CV, n=n, lower=lower, upper=upper, theta0=GMR[j])
plot(GMR, pwr, log="x", ylim=c(0, 1), type="l", lwd=2, col="blue",
     las=1, ylab="power with a Danish twist", cex.main=1,
     main=paste0("theta0 = ", theta0, " (n = ", n, ")"))
abline(v=c(theta0, 1/theta0), lty=3, col="red")
abline(v=c(theta0.dk, 1/theta0.dk), lty=2, col="blue")
arrows(theta0, 0, theta0.dk, 0, length=0.1, angle=25,
       code=2, lwd=2, col="red")
arrows(1/theta0, 0, 1/theta0.dk, 0, length=0.1, angle=25,
       code=2, lwd=2, col="red")
BE     <- sprintf("%s %.4f%s%.4f", "BE-limits:", lower, "\u2026", upper)
pwr    <- sprintf("%s %.4g", "Power (theta0):", pwr.1)
op     <- par(no.readonly=TRUE)
if (round(power, 6) >= target) {
  legend("topright", bg="white", cex=0.9, x.intersp=0,
         legend=c(BE, sprintf("%s %.4f%s%.4f",
                              "GMR-range:", theta0.dk, "\u2026", 1/theta0.dk),
} else {
  legend("topright", bg="white", cex=0.9, x.intersp=0,
         legend=c(BE, sprintf("%s %.4f", "Achievable power:", power), pwr))

It is courageous to assume theta0 0.9 for a NTID (sampleN.TOST() would tell you to get lost). If you believe in 0.95, n would be 44. To get 80% power the GMR-range is 0.9834…1.0169. Power for 0.95 is only 0.2333. Would it be ethical to perform the study?

Something wrong with the forum? It kicks me out nearly all the time.

You are not alone. :crying: See this post.

Dif-tor heh smusma 🖖
Helmut Schütz

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes

Complete thread:

 Admin contact
20,780 posts in 4,351 threads, 1,444 registered users;
online 19 (0 registered, 19 guests [including 12 identified bots]).
Forum time: 14:28 CEST (Europe/Vienna)

All we know about the world teaches us that the effects of A and B
are always different—in some decimal place—for any A and B.
Thus asking “are the effects different?” is foolish.    John W. Tukey

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