## Initial sample size guess for the Potvin methods [Two-Stage / GS Designs]

Hi ElMaestro,

» That's why I included the remark:
» ##equation in Potvin et al.
» I thought you'd be plugging in your own, but be that as it may.

I see.

So with your code I end up with 10/seq or 20 in stage 1. That’s actually the sample size of the fixed design. Try this (ASN is the expected average total sample size, pwr is the probability to show BE in stage 1 or 2, stop the chance to end if stage 1, and pct.stg2 the percentage of studies proceeding to stage 2):

library(PowerTOST) library(Power2Stage) CV     <- 0.2 GMR    <- 0.95 target <- 0.8 n.fix  <- sampleN.TOST(CV=CV, theta0=GMR, targetpower=target,                        details=FALSE, print=FALSE)[["Sample size"]] n1     <- seq(12, n.fix, 2) res    <- data.frame(CV=CV, GMR=GMR, target=target, n1=n1, ASN=NA,                      pwr.1=NA, stop=NA, pct.stg2=NA, pwr.2=NA) for (j in seq_along(n1)) {    x <- power.2stage(CV=CV, theta0=GMR, targetpower=target,                      n1=n1[j], details=FALSE)    res[j, "ASN"]      <- x[["nmean"]]    res[j, "pwr.1"]    <- x[["pBE_s1"]]    res[j, "stop"]     <- 100-x[["pct_s2"]]    res[j, "pct.stg2"] <- x[["pct_s2"]]    res[j, "pwr.2"]    <- x[["pBE"]] } print(signif(res, 3), row.names=FALSE)   CV  GMR target n1  ASN pwr.1 stop pct.stg2 pwr.2  0.2 0.95    0.8 12 20.6 0.413 43.7     56.3 0.842  0.2 0.95    0.8 14 20.0 0.527 55.8     44.2 0.848  0.2 0.95    0.8 16 20.0 0.619 66.1     33.9 0.851  0.2 0.95    0.8 18 20.6 0.695 74.6     25.4 0.856  0.2 0.95    0.8 20 21.7 0.752 81.5     18.5 0.862

I still prefer 16 subjects in stage 1 (already ~62% power and a ~66% chance to stop). The final power is similar to your n1 20 but ASN is lower.

Dif-tor heh smusma 🖖
Helmut Schütz

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