@Skillside wrote:
... let me keep the sample size for noninferiorityty. So at the end of the study what kind of test you would recommend using for testing the hypothesis that there is a difference between frequencies in groups?
You cannot mix and match sample size calculations and hypothesis tests like this. The sample size calculation must be adequate for the planned analysis. In your case, if the intent is to test H0: p1=p2 (equality of success rates) vs. H1: p1≠p2 with the usual chi-square test, the power or sample size calculation needs to be made for this test. As you have already noticed, an equality test based on a sample size which is just sufficient for a non-inferiority test (with a relevant margin) would have low power, i.e., a high probability of type II error. Even the ethics committee might object against such an underpowered study, not to mention regulatory authorities. The likely result -- the null hypothesis cannot be rejected -- would not be helpful for a scientific publication either.
Planning a comparative drug trial with hundreds of participants is a complex endeavor. A responsible study statistician should author the statistical analysis plan (and possibly the corresponding section of the study protocol). This would not only cover the test and/or confidence interval for the primary endpoint, but also details on the analyses of secondary or exploratory endpoints (if any), interim analyses, safety analysis, randomization, the definition of analysis sets and other statistical aspects of the trial. The SAS Support Communities cannot play this role.
Maybe the statistician would suggest an adaptive trial design where the final sample size is not determined in advance, but depends on interim results (the possibility of "early stopping"). Also the medical literature in your therapeutic area could provide examples of similar trials where methods beyond the classical two-sample chi-square test were used in the past. The SAS Support Communities can help when it comes to actually performing the necessary calculations in SAS. Again, good luck with your trial.
Thank you for your all answers FreelanceReinhard,
Of course if the H0: p1=p2 is a true assumption we are probably won't ever know where is the truth before the study.
So in whole disccusion i don't see the point of calculating samplesize for noninferiority/superiority study, isn't it better to calculate samplesize for test which gonna be used at the end? In that case Chi square?
May I ask you, where do you work?
Best,
@Skillside wrote:
Of course if the H0: p1=p2 is a true assumption we are probably won't ever know where is the truth before the study.
Even after the study we won't know the exact true success probabilities p1, p2. In an equality test we would compute the probability of obtaining the observed or more extreme relative success frequencies under the assumption p1=p2. If this probability turned out to be <=0.05 (=a), we would reject the null hypothesis p1=p2 and conclude that the treatment showing the greater success rates really has a higher success probability, i.e., p1≠p2. But we can't know for sure if we committed a type I error by this conclusion.
So in whole disccusion i don't see the point of calculating samplesize for noninferiority/superiority study
Well, it was you who asked (in your initial post) "for the simple calculation of sample size for noninferiority or superiority trial."
isn't it better to calculate samplesize for test which gonna be used at the end?
Exactly. This was the first point in my previous post.
In that case Chi square?
This is the most common test for that purpose.
May I ask you, where do you work?
I'm a freelance Senior Statistical Programmer, based in Germany.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.