## 'Non-superiority' - sample size [Regulatives / Guidelines]

Dear Helmut, dear Jaime!

❝ ❝ […] does that require the upper one-sided 95% CL included in 125% – or […] – assessing the upper limit of the 90% CI only?

❝ Both will work.

With the exception that the ICH E9 guidance suggests for one sided CIs an alpha=0.025 I think. Or am I wrong . That would require 95% CI's and assessing their upper limit only.

❝ ❝ How can we calculate the sample size?

❝ Ouch; good question! Steven Julious (Sample Sizes for Clinical Trials, 2010) gives a method for cross-over studies (actually the other way ’round: non-inferiority) but only for normal distributed data. Have to sleep over it.

Non-superiority is a rather unusual term . The other way round - non-inferiority - would mean that we formulate our problem as non-inferiority.
It's easy. Instead of the hypotheses
H0: µT/µR > 1.25 ('superiority')
HA: µT/µR < 1.25 ('non-superiority')

we formulate
H0: µR/µT < 0.8  ('inferiority')
HA: µR/µT > 0.8  ('non-inferiority')

In case of log-normal distributed data the hypotheses change as usual to hypotheses of differences
H0: log(µR) - log(µT) < -0.2231436 ('inferiority')
HA: log(µR) - log(µT) > -0.2231436 ('non-inferiority')

The corresponding test is a one-sided t-test which has power for a 2x2 crossover (Julious "Sample Sizes for Clinical Trials", 2010, equation 6.22)
1-beta = pt(t1-alpha,n-2,df=n-2,tau)

Edit: I can only reproduce PASS values for power and sample size if I use power=1-pt(...) although Julious termed (1-beta) power .

where pt() is the cumulative distribution function of the non-central t-distribution with non-centrality parameter
tau= abs((log(µT)-log(µR) - d)*sqrt(n)/sqrt(2*MSE))
and d=log(R0) with R0 the null or 'true' ratio.

BTW: PASS 2008 has a module "Noninferiority & superiority -> Two means in a 2x2 crossover -> specify using ratios" that will do the calculations for you. It contains also an option in that module which allows the calculations for the 'non-superiority' case named "Higher is bad".

If you don't own PASS here a quick shot in R:
(design is in the moment only a place holder, nothing other then 2x2 crossover is implemented)
# power function
# set margin to 1.25 to get 'higher is bad'

power.noninf <- function(alpha=0.025, margin=0.8, ratio0, CV, n, design="2x2")
{
df   <- n-2
tval <- qt(1-alpha,df)
se2  <- log(CV^2+1)
tau  <- abs( (log(ratio0)-log(margin))*sqrt(n)/sqrt(2*se2) )
return(1-pt(tval,df,tau))
}

# start value for sample size search from large sample formula
.sampleN0.noninf <- function(alpha=0.025, targetpower=0.8, margin, ratio0, CV)
{
n0 <- 2*log(CV^2+1)*(qnorm(targetpower)+ qnorm(1-alpha))^2 / (log(ratio0)-log(margin))^2
return(ceiling(n0))
}

# sample size estimation for non-inferiority test
sampleN.noninf <- function(alpha=0.025, targetpower=0.8, margin=0.8,
ratio0=1.05, CV, design="2x2", details=FALSE)
{
step <- 2
n    <- .sampleN0.noninf(alpha=alpha, targetpower=targetpower,
margin=margin, ratio0=ratio0, CV=CV)
if (n<=4) n <- 4
if (details){
cat("Sample size search\n")
cat(" n  power\n")
}
n    <- step*(n%/%step)
pow  <- power.noninf(alpha=alpha, margin=margin, ratio0=ratio0, CV=CV, n=n)

if (details) cat(n,pow,"\n")
while (pow>targetpower){
if (n<=4) break
n <- n - step
pow  <- power.noninf(alpha=alpha, margin=margin, ratio0=ratio0, CV=CV, n=n)
if (details) cat(n,pow,"\n")
}
while(pow<targetpower){
n <- n+step
pow  <- power.noninf(alpha=alpha, margin=margin, ratio0=ratio0, CV=CV, n=n)
if (details) cat(n,pow,"\n")
}
if (details) return(invisible(n)) else return(n)
}

For a targetpower=0.8, CV=0.3, margin=0.8 the last function will give the sample sizes
alpha=
ratio0 0.025  0.05
0.9   100    80
0.95   48    38
1.0    30    24
1.05   22    16
1.1    16    14

The whole discussion up to here depends on the assumption of log-normality. If this is a reasonable assumption for measures of fluctuation like PTF or swing is left to you.

Regards,

Detlew