Back Calculating Sample Size [Power / Sample Size]

posted by Helmut Homepage – Vienna, Austria, 2022-05-13 01:10 (708 d 00:56 ago) – Posting: # 22982
Views: 2,474

Hi ElMaestro & Sereng,

❝ ❝ Parallel Group Design

❝ ❝ Two Groups (n=70/group)

❝ ❝ Ratio (90% CI): 109.00 (87.00-135.00)


❝ I am getting around CV = 156% (pooled variance estimate).


Hhm…

library(PowerTOST)
CV <- CI2CV(lower = 0.87, upper = 1.35, n = 140, design = "parallel")
sampleN.TOST(CV = CV, theta0 = sqrt(0.87 * 1.35), design = "parallel")

+++++++++++ Equivalence test - TOST +++++++++++
            Sample size estimation
-----------------------------------------------
Study design: 2 parallel groups
log-transformed data (multiplicative model)

alpha = 0.05, target power = 0.8
BE margins = 0.8 ... 1.25
True ratio = 1.083744, 
CV = 0.9227379

Sample size (total)
 n     power
750   0.800246


❝ ❝ is it possible to calculate a new sample size that would likely meet the BE requirements …


See above.

❝ ❝ … (or declare futility)?


If this is not a blockbuster and/or you have a large budget, yes.
Furthermore, there is no guarantee that you will observe exactly the same T/R-ratio and CV in another study. Especially the T/R-ratio is nasty. In PowerTOST a Bayesian method is implemented, which takes the uncertainties of the estimated T/R-ratio and CV of the provious study into account.

library(PowerTOST)
m      <- 140
CV     <- 0.9227379
theta0 <- 1.083744
design <- "parallel"
res    <- data.frame(method = c("naïve",
                                "uncertain CV",
                                "uncertain T/R-ratio",
                                "both uncertain"),
                     n = NA_integer_, power = NA_real_)
res[1, 2:3] <- sampleN.TOST(CV = CV, theta0 = theta0, targetpower = 0.8,
                            design = design, print = FALSE)[7:8]
res[2, 2:3] <- expsampleN.TOST(CV = CV, theta0 = theta0,
                               targetpower = 0.80,
                               design = design,
                               prior.parm = list(m = m, design = design),
                               prior.type = "CV",
                               details = FALSE, print = FALSE)[9:10]
res[3, 2:3] <- expsampleN.TOST(CV = CV, theta0 = theta0,
                               targetpower = 0.80,
                               design = design,
                               prior.parm = list(m = m, design = design),
                               prior.type = "theta0",
                               details = FALSE, print = FALSE)[9:10]
res[4, 2:3] <- expsampleN.TOST(CV = CV, theta0 = theta0,
                               targetpower = 0.80,
                               design = design,
                               prior.parm = list(m = m, design = design),
                               prior.type = "both",
                               details = FALSE, print = FALSE)[9:10]
print(res, row.names = FALSE)

              method     n     power
               naïve   750 0.8002443
        uncertain CV   760 0.8008385
 uncertain T/R-ratio 13764 0.8000035
      both uncertain 14858 0.8000001

Terrible.

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,988 posts in 4,825 threads, 1,655 registered users;
86 visitors (0 registered, 86 guests [including 2 identified bots]).
Forum time: 02:06 CEST (Europe/Vienna)

The whole purpose of education is
to turn mirrors into windows.    Sydney J. Harris

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