PROC POWER;
twosamplemeans
test=equiv_diff
lower = 91
upper = 101
meandiff=96
stddev = 8
ntotal = .
power = 0.8
alpha = 0.05;
RUN;
Sample Size for Non-Inferiority Trials in SAS
Introduction
PROC POWER1 can be used for sample size calculations for non-inferiority testing. See 2 for explanation of non-inferiority and how to perform Sample size in SAS (including comparing proportions). Below we give 2 sample size examples for the following types of studies:
two-sample comparison of means for Non-inferiority (i.e. testing if one treatment mean is non-inferior to the another treatment mean).
Paired-sample comparison of means (i.e. 2 treatment means recorded on 1 group of patients are equivalent within a set tolerance)
Two Sample Non-inferiority test: Comparing means for parallel design (unpaired)
This example is a sample size calculation for the following hypotheses: \(H_0:\mu2-\mu1\le -\theta\) versus \(H_1: \mu2-\mu1\gt -\theta\).
A client is interested in conducting a clinical trial to compare two cholesterol lowering agents for treatment of hypercholesterolemic patients through a parallel design. The primary efficacy parameter is a low-density lipidprotein cholesterol (LDL-C). We will consider the situation where the intended trial is for testing noninferiority. For establishing it, suppose the true mean difference is 0 and the noninferiority margin is chosen to be -0.05 (-5%). Assuming SD = 0.1, how many patients are required for an 80% power and an overall significance level of 5%?
As shown below, a total sample size of 102 is recommended, which equates to 51 in each group.
Comparing means for crossover design (paired)
Here we assume there is no carry-over effect and that the variance is known. For more information see3. There is no obvious way in SAS to do cross over non-inferiority, however, given the one sided test, you can half the alpha using the equiv_diff option to give you the non-inferiority sample size.
Estimating the within patient variance and correlation.
Let’s consider a standard two-sequence, two period crossover design. Suppose that the sponsor is interested in showing non-inferiority of the test drug against the reference with the non-inferiority margin -20%. Assume power of 80%. Based on the results from previous trials, it is estimated that the variance (of the difference) is 0.2 (20%). Suppose that the true mean difference is -0.1 (-10%). What is the required sample size, assuming significance level of 5%?
Alpha = 0.025 is used below, instead of 0.05 because you are doing non-inferiority (a one sided test). Note that this is still the sample size for alpha=0.05. The below shows a sample size of 13 patients is required.
pairedmeans
test=equiv_diff
lower = -0.3
upper = 0.1
meandiff = -0.1
stddev = 0.2
corr = 0.5
alpha = 0.025
npairs = .
power = 0.8;
References
Version
─ Session info ───────────────────────────────────────────────────────────────
setting value
version R version 4.4.2 (2024-10-31)
os macOS Sequoia 15.6.1
system aarch64, darwin20
ui X11
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/London
date 2025-08-29
pandoc 3.4 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown)
─ Packages ───────────────────────────────────────────────────────────────────
! package * version date (UTC) lib source
R sample_s_noninferiority <NA> <NA> [?] <NA>
[1] /Users/christinafillmore/Documents/GitHub/CAMIS/renv/library/macos/R-4.4/aarch64-apple-darwin20
[2] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
R ── Package was removed from disk.
─ External software ──────────────────────────────────────────────────────────
setting value
SAS 9.04.01M7P08062020
──────────────────────────────────────────────────────────────────────────────