Good point! [Power / Sample Size]

posted by Helmut Homepage – Vienna, Austria, 2015-08-19 04:20 (3166 d 12:26 ago) – Posting: # 15296
Views: 10,876

Hi zizou,

good points! First of all I could reproduce your numbers; nice excursion into combinatorics.

library(PowerTOST)
CV  <- 0.262
dor <- 0.15
n.des  <- sampleN.TOST(CV=CV, details=F, print=F)[["Sample size"]]
n.adj  <- round(n.des/(1-dor)/2)*2
do     <- n.adj-n.des
n.TR   <- seq(n.adj/2-do, n.adj/2, 1)
n.RT   <- seq(n.adj/2, n.adj/2-do, -1)
res    <- matrix(nrow=length(n.TR), ncol=7, byrow=T, dimnames=list(rep(NULL, 5),
            c("n", "TR", "RT", "TR.do", "RT.do", "prob", "power")))
res[, 1] <- n.TR+n.RT
res[, 2] <- n.TR
res[, 3] <- n.RT
res[, 4] <- n.adj/2-n.TR
res[, 5] <- n.adj/2-n.RT
for (j in seq_along(n.TR)) {
  res[j, 6] <- sprintf("%.9f",
                (choose(n.adj/2, n.adj/2-n.TR[j])*
                choose(n.adj/2, n.adj/2-n.RT[j]))
                /choose(n.adj, do))
  res[j, 7] <- sprintf("%.5f", power.TOST(CV=CV, n=c(n.TR[j], n.RT[j])))
}
Sum.p  <- sum(as.numeric(res[, 6]))
res    <- data.frame(res)
print(res, row.names=F); cat("Sum p:", Sum.p, "\n")

  n TR RT TR.do RT.do        prob   power
 30 12 18     6     0 0.009530792 0.78425
 30 13 17     5     1 0.079178886 0.79345
 30 14 16     4     2 0.240364474 0.79877
 30 15 15     3     3 0.341851697 0.80051
 30 16 14     2     4 0.240364474 0.79877
 30 17 13     1     5 0.079178886 0.79345
 30 18 12     0     6 0.009530792 0.78425
Sum p: 1


❝ So in this example we have 65.8% (100*(1-p_4)) probability that we shoot ourselves in the foot :no:.


Depends on how rigid the bullet is. Full metal jacket are not even the 6/0 (or 0/6)-cases (power 78.4%). The others (with a much higher probability) are soft-balls.

❝ Maybe not so big shot - planned number of subjects finished will be achieved :-), but sample size wasn't estimated with option of getting unbalanced in mind. Even though there is almost 2/3 probability that it will ends unbalanced (if assumptions are right, and no better GMR than expected, no lower CV estimated from residual mean square than expected, and no lower dropout-rate than expected).


Correct. I would be wary to assume very different dropout-rates in sequences. Theoretically they should occur at random (nTR ~ nRT). If we expect different dropout-rates a priori, IMHO this would also imply that we expect a true (!) sequence effect – which would confound the treatment effect. Opening a can of worms. :-D

"Remember, with great power comes great responsibility."


Power. That which statisticians are always calculating
but never have.
    Stephen Senn (Statistical Issues in Drug Development, Wiley 2004, p197)

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

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

Complete thread:

UA Flag
Activity
 Admin contact
22,987 posts in 4,824 threads, 1,665 registered users;
92 visitors (0 registered, 92 guests [including 6 identified bots]).
Forum time: 16:46 CEST (Europe/Vienna)

The only way to comprehend what mathematicians mean by Infinity
is to contemplate the extent of human stupidity.    Voltaire

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