T1E after 1st stage in TSDs [Two-Stage / GS Designs]

posted by Helmut Homepage – Vienna, Austria, 2022-06-24 14:33 (49 d 23:01 ago) – Posting: # 23081
Views: 817

Hi Mittyri,

» could you please guide me regarding the function to be used for T1E estimation after 1st stage of Potvin methods (Power2Stage R package)?

Really in the first stage? Negligible for the combinations where you get the largest TIE overall. Anyhow, your wish is my command:

library(Power2Stage)
# alpha0 = 0.05 for method = "C" and alpha = c(0.0294, 0.0294) for method = "B"
# and "C" are defaults; GMR = 0.95, targetpower = 0.8, if theta0 = 0.8 or 1.25,
# by default nsims = 1e6.

CV  <- 0.2
n1  <- 12
# That’s an evil combination; commonly the largest
# TIE with a relatively small CV and very small n1.

res <- data.frame(method = c("B", "C"), alpha0 = 0.05, alpha = 0.0294,
                  TIE.stage1 = NA_real_, TIE.stage2 = NA_real_)
for (j in 1:nrow(res)) {
  tmp         <- power.tsd(method = res$method[j], n1 = n1, CV = CV,
                           theta0 = 1.25)
  res[j, 4:5] <- c(tmp$pBE_s1, tmp$pBE)
}
res$alpha0[1] <- ""
print(res, row.names = FALSE)

 method alpha0  alpha TIE.stage1 TIE.stage2
      B        0.0294   0.028849   0.046273
      C   0.05 0.0294   0.035777   0.051100


Belt plus suspenders:

library(PowerTOST)
# I don’t recommend that but let n1 = n of a fixed sample design
# i.e., high chance of passing in the first stage of a TSD.

CV  <- 0.2
n1  <- sampleN.TOST(CV = CV, print = FALSE)[["Sample size"]]
for (j in 1:nrow(res)) {
  tmp         <- power.tsd(method = res$method[j], n1 = n1, CV = CV,
                           theta0 = 1.25)
  res[j, 4:5] <- c(tmp$pBE_s1, tmp$pBE)
}
res$alpha0[1] <- ""
print(res, row.names = FALSE)

 method alpha0  alpha TIE.stage1 TIE.stage2
      B        0.0294   0.029142   0.034816
      C   0.05 0.0294   0.045318   0.049042



PS: I changed the category from Software. Though you asked for the [image]-package Power2Stage, perhaps somebody would have the balls to roll out own code. ;-)

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,301 posts in 4,667 threads, 1,585 registered users;
online 5 (0 registered, 5 guests [including 5 identified bots]).
Forum time: Saturday 13:35 CEST (Europe/Vienna)

In the field of observation,
chance favors only the mind that is prepared.    Louis Pasteur

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