Back Calculating Sample Size [Power / Sample Size]

posted by Helmut Homepage – Vienna, Austria, 2022-05-12 23:10 (14 d 17:48 ago) – Posting: # 22982
Views: 584

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,108 posts in 4,630 threads, 1,567 registered users;
online 9 (0 registered, 9 guests [including 8 identified bots]).
Forum time: Friday 16:59 CEST (Europe/Vienna)

We absolutely must leave room for doubt
or there is no progress and no learning.
There is no learning without having to pose a question.
And a question requires doubt.
People search for certainty.
But there is no certainty.    Richard Feynman

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