Imph
☆

Algeria,
2021-10-20 11:03
(48 d 09:47 ago)

Posting: # 22643
Views: 708

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

Vienna, Austria,
2021-10-20 11:36
(48 d 09:14 ago)

@ Imph
Posting: # 22644
Views: 629

## 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 -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 🖖
Helmut Schütz

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

Algeria,
2021-10-20 12:53
(48 d 07:58 ago)

@ Helmut
Posting: # 22647
Views: 593

## Exact (Owen’s Q)

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

Helmut
★★★

Vienna, Austria,
2021-10-20 13:26
(48 d 07:24 ago)

@ Imph
Posting: # 22648
Views: 594

## Exact (Owen’s Q)

Hi Imph,

Welcome.

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

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  Open Source (licensed under GPL-3), comes at no cost, was used in numerous publications, textbooks, and even by the …

Dif-tor heh smusma 🖖
Helmut Schütz

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

Algeria,
2021-10-24 10:41
(44 d 10:10 ago)

@ Helmut
Posting: # 22654
Views: 487

## 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.

Helmut
★★★

Vienna, Austria,
2021-10-24 10:54
(44 d 09:57 ago)

@ Imph
Posting: # 22655
Views: 515

## 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 🖖
Helmut Schütz

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

Berlin, Germany,
2021-10-24 19:26
(44 d 01:24 ago)

@ Imph
Posting: # 22656
Views: 484

## 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