BookmarkSubscribeRSS Feed
Jack2012
Obsidian | Level 7

Background:  I calcualted the sample size for 2 groups with the response is binary data, and the proportion is the proportion of responders.  The two group have same size. Target to test the non-inferiority between the proportion of group 1 and group 2.

Size calculation Code:

proc power;

twosamplefreq alpha=0.05 test=pchi sides=U npergroup=24 nullproportiondiff=-0.3

refproportion=0.9

proportiondiff=-0.06 power=.;

run;

Question:  Since this power calculation is based on the Pearson Chi-square test, how could I reach the aim to test non-inferiority test of following Hypothesis testing by use of Chi-square Test?:

H0: proportion of group 1 - (minus) proportion of group 2 greater than or equal to -0.03 (0.03 is the margin)

vs

H1: proportion of group 1 - (minus) proportion of group 2 less than -0.03 (0.03 is the margin)

The criteria to conclude: The 95% confidence interval of the proportion differences based on Chi-square test  will be calculated and the non-inferiority will be concluded if the LOWER bound of the confidence interval is greater than -0.3.

What I found is: The only test I found in SAS manual and below link is by use of WADL test, and there is NO Chi-square test available to use. Could you tell me what should I do to analyze the data? Just continue to use the WALD test, and conclude the noninferiority if the 95% confidence interval lower bound exceeds -0.3?

The following code is the dummy data I created and the code to test by use of WALD test, please  help me on my questions, thanks.

data pd1;
input grp $ response count;
datalines;
grp1 1 20
grp1 0 4
plcb 1 18
plcb 0 6
;
run;

/*Do non-inferiority test by Chi-square test*/
proc freq data=pd1;
tables grp*response/alpha=0.025 riskdiff(noninf column=2 correct margin=0.3);/*noninf:non-inferiority test; margin: the margin want to detect*/
weight count;/*count: then number of responders*/
run;

2 REPLIES 2
estrucida
Calcite | Level 5

Hello Jack,

I also have the same problem.

I search quite a lot how to solve it but found no answer anywhere. I end up using excel and just apply the formula.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 4812 views
  • 0 likes
  • 2 in conversation