Imph
★    

2021-10-20 13:03
(975 d 06:19 ago)

Posting: # 22643
Views: 4,037
 

 Choosing formula for sample size [Power / Sample Size]

Hi,

I would like to know please which formula to choose to calculate the number of subjects among all the formulas published: Dilleti, Chow, Julious,...
For now I am using chow's formula, I would like to know if there is a plausible reference that supports its use.

Thank you.
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2021-10-20 13:36
(975 d 05:46 ago)

@ Imph
Posting: # 22644
Views: 3,555
 

 Exact (Owen’s Q)

Hi Imph,

❝ […] which formula to choose to calculate the number of subjects among all the formulas published: Dilleti, Chow, Julious,...


Diletti (1981), which is exact based on Owen’s Q function. Julious is based on an approximation by the noncentral t-distribution and fine as well.

❝ For now I am using chow's formula, I would like to know if there is a plausible reference that supports its use.


Don’t. Chow’s is based on the shifted central t-distribution and the paper contains typos. See also this post.

I suggest to estimate sample sizes with functions of the [image]-package PowerTOST. All three methods are im­ple­ment­ed, where the exact one is the default.
Whilst in many cases sample sizes based on the shifted central t-distribution will be equal to the others, sometimes estimated sample sizes are larger than necessary. The background is shown in an article.

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
Imph
★    

2021-10-20 14:53
(975 d 04:30 ago)

@ Helmut
Posting: # 22647
Views: 3,491
 

 Exact (Owen’s Q)

Thank you very much for your answer.

From where I am, I was unable to access dileti's publications. Can you please help me get them.

I thank you in advance
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2021-10-20 15:26
(975 d 03:56 ago)

@ Imph
Posting: # 22648
Views: 3,446
 

 Exact (Owen’s Q)

Hi Imph,

❝ Thank you very much for your answer.


Welcome.

❝ From where I am, I was unable to access dileti's publications. Can you please help me get them.


Check your inbox. Two points:
  1. The paper contains tables for certain CVs, T/R-ratios, and target power.
    If you want something else, don’t be tempted to interpolate. Power curves are highly nonlinear and hence, interpolation is not that easy.
  2. Although the exact formula is given, calculating the definite integrals of the bivariate noncentral t-distribution is not trivial.
Why do you want to re-invent the wheel? PowerTOST is [image] Open Source (licensed under GPL-3), comes at no cost, was used in numerous publications, textbooks, and even by the [image]… :-D

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
Imph
★    

2021-10-24 12:41
(971 d 06:41 ago)

@ Helmut
Posting: # 22654
Views: 3,359
 

 Exact (Owen’s Q)

Thank you so much. Your response has been of great help.

I have a few more questions if I may:
  • By consulting Dileti's paper, I noticed that there is no formula for the calculation of the number of subjects. Is there a way or a reference to get the formula please.
  • Another question, in the calculation of the degrees of freedom, for example (2n-2), where "n" has to be estimated. I would like to know on what basis this "n" is estimated.
Thank you in advance.
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2021-10-24 12:54
(971 d 06:28 ago)

@ Imph
Posting: # 22655
Views: 3,329
 

 n iteratively from power

Hi Imph,

❝ Thank you so much. Your response has been of great help.


Welcome.

❝ – By consulting Dileti's paper, I noticed that there is no formula for the calculation of the number of subjects. Is there a way or a reference to get the formula please.


You can only calculate power for a given sample size, i.e., you start with an assumption and then increase (or decrease) n to obtain at least the target power. See there for the details.

Step by step:

library(PowerTOST)
CV     <- 0.25
theta0 <- 0.95
target <- 0.80
n      <- 12                    # minimum acc. to the GLs
power  <- power.TOST(CV = CV, theta0 = theta0, n = n)
iter   <- 1
res    <- data.frame(iter = iter, n = n, power = power)
if (res$power[iter] < target) { # upwards
  repeat {
    power <- power.TOST(CV = CV, theta0 = theta0, n = n)
    res[iter, ] <- c(iter, n, power)
    if (power >= target) {
      break
    } else {
      iter <- iter + 1
      n    <- n + 2
    }
  }
} else {                        # downwards
  repeat {
    power <- power.TOST(CV = CV, theta0 = theta0, n = n)
    res[iter, ] <- c(iter, n, power)
    if (power < target) {
      res <- res[-nrow(res), ]
      break
    } else {
      iter <- iter + 1
      n    <- n - 2
    }
  }
}
print(res, row.names = FALSE)

 iter  n     power
    1 12 0.3137351
    2 14 0.4141013
    3 16 0.5041795
    4 18 0.5801284
    5 20 0.6430574
    6 22 0.6953401
    7 24 0.7391155
    8 26 0.7760553
    9 28 0.8074395


In PowerTOST’s sample size functions you can show the iterations by setting the argument details to TRUE (by default only the final result is shown):

sampleN.TOST(CV = 0.25, theta0 = 0.95, targetpower = 0.80, details = TRUE)

+++++++++++ Equivalence test - TOST +++++++++++
            Sample size estimation
-----------------------------------------------
Study design: 2x2 crossover
Design characteristics:
df = n-2, design const. = 2, step = 2

log-transformed data (multiplicative model)

alpha = 0.05, target power = 0.8
BE margins = 0.8 ... 1.25
True ratio = 0.95,  CV = 0.25

Sample size search (ntotal)
 n     power
26   0.776055
28   0.807439

Exact power calculation with
Owen's Q functions.


❝ – […] in the calculation of the degrees of freedom, for example (2n-2), where "n" has to be estimated. I would like to know on what basis this "n" is estimated.


See above.

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
d_labes
★★★

Berlin, Germany,
2021-10-24 21:26
(970 d 21:56 ago)

@ Imph
Posting: # 22656
Views: 3,306
 

 aproximate n

Dear Imph,

beside to all what Helmut has told you you may find in the /doc directory of the package a PDF file "BE_power_sample_size_excerpt.pdf" which has some small further informations about the sample size estimation.

You may obtain an approximation of n by using the large sample approximation.
See P. Zhang
“A simple formula for sample size calculation in equivalence studies.”
J. Biopharm. Stat. 2003 Aug;13(3):529-38
This approximate number is in many cases relatively close to the exact value, and is used in PowerTOST as starting value of the iterative search of the sample size.

Regards,

Detlew
Willem Talloen
☆    

Belgium,
2022-09-01 17:48
(659 d 01:34 ago)

@ Helmut
Posting: # 23254
Views: 2,223
 

 Exact (Owen’s Q)

Hi Helmut,

Thanks for your answers (and for the R package ;-) ).

❝ link=https://cran.r-project.org/package=PowerTOST]PowerTOST[/link] is [image] Open Source (licensed under GPL-3), comes at no cost, was used in numerous publications, textbooks, and even by the [image]:-D


Could you elaborate on your note of the use of PowerTOST by FDA? It would provide me an additional argument for using PowerTOST for formal sample size estimation in our company.

Thanks,
Willem


Edit: Full quote removed. Please delete everything from the text of the original poster which is not necessary in understanding your answer; see also this post #5[Helmut]
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2022-09-01 18:31
(659 d 00:52 ago)

@ Willem Talloen
Posting: # 23256
Views: 2,255
 

 PowerTOST & FDA

Hi Willem,

❝ Could you elaborate on your note of the use of PowerTOST by FDA? It would provide me an additional argument for using PowerTOST for formal sample size estimation in our company.


Maybe this post helps.

About the validation of PowerTOST with examples:See this document1 about the acceptability of Base R. R is updated every couple of months with documented changes2 and maintaining a bug-tracking system.3 I recommend to use always the latest release.

The authors of PowerTOST tried to do their best to provide reliable and valid results. The package’s NEWS-file documents the development of the package, bug-fixes, and introduction of new methods. Issues are tracked at Git­Hub (as of today none is still open). So far the package had ≈93,000 downloads. Therefore, it is extremely unlikely that bugs were not detected given its large user base.

However, the ultimate responsibility of validating any software (yes, of SAS as well…) lies in the hands of the user.
  • The software programs […] should be suitable and validated for the intended use. Whether standard, off-the-shelf software is purchased or bespoke software is developed, developer, vendor and/or service provider qualification and/or validation certificates may be provided but it is the user’s responsibility to ensure that the software is validated for its intended use and that it was developed in a controlled manner in accordance with a QA system. […] There should be SOPs in place for usage of each software program that is used to perform activities of a BE study. […] Software programs used […] should be specified in writing. […] These requirements apply to all systems used in clinical BE studies, e.g. […] for statistical analysis […].4
  • The credibility of the numerical results of the analysis depends on the quality and validity of the methods and software (both internally and externally written) used […] for processing the data statistically. Data management activities should therefore be based on thorough and effective standard operating procedures. The computer software used for […] statistical analysis should be reliable, and documentation of appropriate software testing procedures should be available.5
  • FDA does not require use of any specific software for statistical analyses […]. However, the software package(s) used for statistical analyses should be fully documented in the submission, including version and build identification.6

  1. The R Foundation for Statistical Computing. A Guidance Document for the Use of R in Regulated Clinical Trial Environments. Vienna. October 18, 2021. Online.
  2. The R Foundation. R News. 2022-04-22. Online.
  3. Bugzilla. R bug tracking system. Online.
  4. WHO. Guidance for organizations performing in vivo bioequivalence studies. Geneva. May 2016. Technical Report Series No. 996, Annex 9. Section 4.4. Online.
  5. FDA, CDER/CBER. E9 Statistical Principles for Clinical Trials. Rockville. September 1998. Section V.H. Download.
  6. FDA. Statistical Software Clarifying Statement. May 6, 2015. Download.

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
UA Flag
Activity
 Admin contact
23,059 posts in 4,841 threads, 1,665 registered users;
36 visitors (0 registered, 36 guests [including 7 identified bots]).
Forum time: 19:23 CEST (Europe/Vienna)

[…] an inappropriate study design is incapable of answering
a research question, no matter how careful the subsequent
methodology, conduct, analysis, and interpretation:
Flawless execution of a flawed design achieves nothing worthwhile.    J. Rick Turner

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