<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sample size, superiority and noninferiority trial in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837461#M331111</link>
    <description>&lt;P&gt;Thank you for your explanation.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Oct 2022 20:30:35 GMT</pubDate>
    <dc:creator>Skillside</dc:creator>
    <dc:date>2022-10-07T20:30:35Z</dc:date>
    <item>
      <title>Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837158#M331007</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;i would like to ask you for the simple calculation of sample size for noninferiority or superiority trial.&lt;/P&gt;
&lt;P&gt;Let's asumme that i have two treatment groups. One group will have succes around 95% the second 96%.&lt;/P&gt;
&lt;P&gt;I would like to calucalte the sample size for the second group where i use that treatment is not worse in comparison to ref group (95%). I can expect the max 4% of difference.&lt;/P&gt;
&lt;P&gt;I found the following code for non-infreiority code:&lt;/P&gt;
&lt;P&gt;proc power;&lt;BR /&gt;twosamplefreq groupweights=(1 1) groupps=(0.95 0.96) alpha=0.025 power=0.9&lt;BR /&gt;test=PChi sides=1 ntotal=.;&lt;BR /&gt;plot min=0.1 max=0.9;&lt;BR /&gt;title "Sample Size Calculation for Comparing Two Binomial Proportions (1:1 Allocation"&lt;BR /&gt;title2 "in a Non-Inferiority Trial"; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;What should i do to calculate the superiority trial? (i will turn over ther assumtions).&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Skillside&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 10:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837158#M331007</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-06T10:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837191#M331018</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279880"&gt;@Skillside&lt;/a&gt;,&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279880"&gt;@Skillside&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Let's asumme that i have two treatment groups. One group will have succes around 95% the second 96%.&lt;/P&gt;
&lt;P&gt;I would like to calucalte the sample size for the second group where i use that treatment is not worse in comparison to ref group (95%). I can expect the max 4% of difference.&lt;/P&gt;
&lt;P&gt;I found the following code for non-infreiority code:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc power;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;twosamplefreq groupweights=(1 1) groupps=(0.95 0.96) alpha=0.025 power=0.9&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;test=PChi sides=1 ntotal=.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plot min=0.1 max=0.9;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;title "Sample Size Calculation for Comparing Two Binomial Proportions (1:1 Allocation"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;title2 "in a Non-Inferiority Trial"; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This code uses the default null proportion difference of &lt;EM&gt;zero&lt;/EM&gt; -- where I'd say non-inferiority and superiority "coincide" and the test is just an ordinary one-sided test of the null hypothesis of equal success probabilities. Moreover, it calculates the &lt;EM&gt;total&lt;/EM&gt; sample size, not "&lt;SPAN&gt;the sample size for the second group".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;What should i do to calculate the superiority trial? (i will turn over ther assumtions).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you specify a &lt;EM&gt;margin&lt;/EM&gt; of, say, 4%, you can test if the success probability in the experimental group is less than 4 percentage points lower than in the reference group ("non-inferiority") or you can test if it is more than 4&amp;nbsp;percentage points higher than in the reference group ("superiority"). For the latter the sample size calculation requires that the assumed true difference is &lt;EM&gt;greater than&lt;/EM&gt; the margin, e.g., 6% (reference group: 90%, experimental group: 96%). The sample size calculation could then look like this (cf.&amp;nbsp;&lt;SPAN&gt;the &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://documentation.sas.com/doc/en/statug/15.2/statug_power_details74.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&lt;SPAN&gt;)&lt;FONT face="helvetica"&gt;:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT size="4"&gt;proc power;
twosamplefreq groupps=(&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;0.90&lt;/STRONG&gt;&lt;/FONT&gt; 0.96) alpha=0.025 &lt;STRONG&gt;&lt;FONT color="#3366FF"&gt;nullpdiff=0.04&lt;/FONT&gt;&lt;/STRONG&gt; power=0.9
test=&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;fm&lt;/STRONG&gt;&lt;/FONT&gt; sides=1 &lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;npergroup&lt;/STRONG&gt;&lt;/FONT&gt;=.;
run;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;Result: n=3313 per group (i.e., 6626 in total).&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 16:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837191#M331018</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-10-06T16:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837232#M331030</link>
      <description>&lt;P&gt;Thank you for your replay. Is it mean that 0.90 in your code is the ref group? and experimental group is 0.96 so you calculate the superiority? and if you swap the order then you will have non-inferiroirty sample size calculation?&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 17:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837232#M331030</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-06T17:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837299#M331043</link>
      <description>&lt;P&gt;Yes, my example answers your question&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;What should i do to calculate the superiority trial?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, the 0.90=90% is a &lt;U&gt;&lt;EM&gt;totally hypothetical&lt;/EM&gt;&lt;/U&gt; value for the true success probability in the reference group. Starting from your 96% for the other group and a 4% superiority margin (motivated by your earlier remark&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I can expect the max 4% of difference.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;which I may have misunderstood), I had to select a value &amp;lt;96%−4%=92% and I arbitrarily chose 90% &lt;EM&gt;just as an example&lt;/EM&gt;. Of course, &lt;EM&gt;you&lt;/EM&gt; must specify both the success probabilities and the margin appropriately, based on your subject matter knowledge and requirements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;and if you swap the order then you will have non-inferiroirty sample size calculation?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, changing my example to &lt;FONT face="courier new,courier"&gt;groupps=(&lt;STRONG&gt;0.96 0.90&lt;/STRONG&gt;)&lt;/FONT&gt;&amp;nbsp;would make it an example for the non-inferiority case: A treatment with 96% success probability would be shown to be "less than 4% worse" (!) than the reference group with 90% success probability. We would expect that a relatively &lt;EM&gt;small&lt;/EM&gt; sample size is sufficient to show that -- after all, the treatment is not at all worse, but even better than the other. Indeed, the result is n=148 per group. If the treatment was in fact 1% &lt;EM&gt;worse&lt;/EM&gt; than the reference -- say,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;groupps=(&lt;STRONG&gt;0.95 0.96&lt;/STRONG&gt;)&lt;/FONT&gt; -- we could still perform the non-inferiority test with the margin of 4%. Of course, we would expect to need a &lt;EM&gt;larger&lt;/EM&gt; sample and PROC POWER confirms this: n=1070 per group.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 22:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837299#M331043</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-10-06T22:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837461#M331111</link>
      <description>&lt;P&gt;Thank you for your explanation.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 20:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837461#M331111</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-07T20:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837923#M331323</link>
      <description>I have an addtional question. So i calculated the required sample size and i am going to conduct a study. Probably, at the end of the study, i will asses the differences (of outcomes) with Chi square test and when i implement the results from sample size estimation (it was set on 0.9 power) the power of the Chi-square test is around 0.6. I was sure that after the calculation of the required sample size the tests will be more powerful, could you please provide me an explanation of this situation?</description>
      <pubDate>Tue, 11 Oct 2022 18:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837923#M331323</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-11T18:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837934#M331325</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279880"&gt;@Skillside&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;... when i implement the results from sample size estimation (it was set on 0.9 power) the power of the Chi-square test is around 0.6.&amp;nbsp;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How did you determine that power "around 0.6"? I had checked all of the sample sizes computed with PROC POWER for this thread by means of PROC FREQ (with the appropriate options for non-inferiority or superiority tests, respectively) applied to datasets simulating between 10,000 and 100,000 studies. Mostly the estimated power was close to 90% (like 90.x%), as expected. In the remaining few cases it was even slightly higher (like between 91% and 92%).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that I consistently used the &lt;EM&gt;Farrington-Manning score test&lt;/EM&gt; for cases with "&lt;EM&gt;p&lt;SUB&gt;0&lt;/SUB&gt;&lt;/EM&gt;≠0" (i.e., for proper non-inferiority and superiority tests) both in PROC POWER (see option &lt;FONT face="courier new,courier"&gt;test=fm&lt;/FONT&gt;) and PROC FREQ, not the Pearson chi-square test, because doing so is recommended in &lt;SPAN&gt;the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_power_details74.htm" target="_blank" rel="noopener nofollow noreferrer"&gt;documentation&lt;/A&gt;. If you have a good reason for using the chi-square test, you can explicitly use the option &lt;FONT face="courier new,courier"&gt;test=pchi&lt;/FONT&gt; of the TWOSAMPLEFREQ statement in the power calculation. I haven't tested this yet, but wouldn't expect power differences as large as 0.6 vs. 0.9 for the same sample size, unless in extreme cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you continue to observe an unexpectedly low power of your tests, I think it would be a good idea to open a new thread in the &lt;A href="https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures" target="_blank" rel="noopener"&gt;Statistical Procedures&lt;/A&gt; forum for this new problem. Thus you will also get a larger audience for your question. Of course, I will look into it as well. You can post a link to the current thread and describe the discrepancy between your observations and the results from PROC POWER in more detail. In particular, post the PROC POWER and (if any) PROC FREQ code you used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 19:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837934#M331325</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-10-11T19:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837935#M331326</link>
      <description>Thank you for your answer. So let me show you what i've done. Superiority for drug 1 vs drug 2&lt;BR /&gt;proc power;&lt;BR /&gt;twosamplefreq groupps=(0.97 0.95) alpha=0.025 nullpdiff=0.01 power=0.8&lt;BR /&gt;test=fm sides=1 npergroup=.;&lt;BR /&gt;run;&lt;BR /&gt;The result is 689.&lt;BR /&gt;&lt;BR /&gt;Then the outcome - endpoints (binary variables) will be tested via Chi-square test. So i checked the power of the Chi-square.&lt;BR /&gt;The hypothesis in Chi-square test assumes no difference:&lt;BR /&gt;proc power; &lt;BR /&gt;  twosamplefreq test=pchi &lt;BR /&gt;  groupproportions = (.97 .95) &lt;BR /&gt;  nullproportiondiff = 0.00 &lt;BR /&gt;  power = .&lt;BR /&gt;  npergroup = 698;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;The result show power at level 0.4...&lt;BR /&gt;Thank you for your answer. &lt;BR /&gt;Could you please explain me what nullproportiondiff is for in chi-square while the it assumes no differences?</description>
      <pubDate>Tue, 11 Oct 2022 20:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837935#M331326</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-11T20:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837954#M331333</link>
      <description>&lt;P&gt;Thanks for providing the details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your first PROC POWER step is for a &lt;EM&gt;non-inferiority&lt;/EM&gt; (not: superiority) test because the value of the NULLPDIFF= option is positive&amp;nbsp;&lt;SPAN&gt;in a lower one-sided test. It computes the sample size for a study to show that drug 1 (with success rate 0.97) is not inferior to drug 2 (with success rate 0.95) by more than 0.01. The sample size is relatively small because drug 1 is in fact &lt;EM&gt;better&lt;/EM&gt; than drug 2 (in terms of success rates).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your second PROC POWER step computes the power of a different test: a test of &lt;EM&gt;equality&lt;/EM&gt;&amp;nbsp;of success rates, not non-inferiority (also: chi-square instead of F.-M. score test, but this is not the main difference). It is similar to a non-inferiority test with a very small NULLPDIFF value ("limit case"). Since the difference between the success rates is only 0.02, the required sample size is substantially higher (and, correspondingly, the power for the same sample size much lower, as you've seen) than for the non-inferiority test described above where the NULLPDIFF was &lt;EM&gt;in the opposite direction&lt;/EM&gt; of the difference between the true success rates. If you change NULLPDIFF to 0.01 (and use npergroup=6&lt;EM&gt;89&lt;/EM&gt;), you obtain a power of 0.811 -- close to the power of the recommended score test. (Technically, the chi-square test can also be used in the non-inferiority or superiority cases, which is why the NULLPDIFF= option is available also for this test.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to perform a &lt;EM&gt;superiority&lt;/EM&gt; test showing that drug 1 is superior to drug 2 by a margin of 0.01, i.e., that the assumed difference of 0.02 is significantly larger than 0.01, you need to specify &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;NULLPDIFF=&lt;FONT size="5"&gt;&lt;FONT color="#FF0000"&gt;-&lt;/FONT&gt;&lt;FONT size="4"&gt;0.01&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;or (equivalently) &lt;EM&gt;swap the two values in the GROUPPS= option&lt;/EM&gt;, as we discussed recently. We should expect an even larger sample size than for the test of equality and, indeed, PROC POWER yields n=&lt;STRONG&gt;5959&lt;/STRONG&gt; per group. (I haven't run simulations for this case yet, but can do so tomorrow&amp;nbsp;if you like. It's close to midnight in my time zone and I'm about to leave the office, sorry for the inconvenience.)&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 21:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837954#M331333</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-10-11T21:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837955#M331334</link>
      <description>Thank you for your support. This discussion is exciting for me. But hold on..... seems like i misunderstood something. &lt;BR /&gt;Once again, let's use a two scenarios (S1 and S2). &lt;BR /&gt;S1: I would like to conduct samplesize estimation in a noninferiority study. The drug 2 is not worse than drug 1, where the success rate of drug 1 is  97%  and the success rate for drug 2 is 95%. So difference in the endpoints is 2%, i suggested margin (probably nullpdiff) 1% or 3% or 4%. I was sure that in this case the assumption for margin = 1 is that drug 2 will have success rate between 94 and 96%. &lt;BR /&gt;S2: let's assume that drug 2 to will be superior to drug 1. Still the succes rates are the same for both drugs, but then i have to expect margin at least 3? &lt;BR /&gt;Other questions: if i have set the nullpdiff option as positive value then swaping the order in the groupps option changes the calculation from superior to noninferiority samplesize calculation. And if i won't swap order in groupps option and i will change the value of nullpdiff for negative then i will as well change from superiority to noninferiority study?&lt;BR /&gt;What should i do to decrease the samplesize? the drugs do not differ between each other, i either believe that this one with 95% success rate(SR) is superior to drug with 97% SR.&lt;BR /&gt;Please, suggest a solution for that case. The study will take too much time if i will have 1500 participants per arm. In my time zone it after midnight, 00:22. Have a nice night! Thanks again, and i hope to talk to you tomorrow. &lt;BR /&gt;</description>
      <pubDate>Tue, 11 Oct 2022 22:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/837955#M331334</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-11T22:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838006#M331366</link>
      <description>&lt;P&gt;S1: Given the success rates (probabilities) of 97% for drug 1 and 95% for drug 2, non-inferiority of drug 1 (vs. drug 2) could be shown for &lt;EM&gt;any&lt;/EM&gt; positive margin with sufficiently large (but limited) sample size (for a given value of power) because it's in fact &lt;EM&gt;superior&lt;/EM&gt; to drug 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, non-inferiority of drug &lt;EM&gt;2&lt;/EM&gt; vs. drug &lt;EM&gt;1&lt;/EM&gt; could be shown only for non-inferiority margins &amp;gt;2%. With a margin approaching 2% (from above) the required sample size (for a constant power) grows to infinity. Margins &amp;lt;=2% are infeasible.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;S2: With the above success rates drug 1 is superior to drug 2, not vice versa. One could test the most common null hypothesis of equal success rates. The required sample size would tend to be greater than that of the non-inferiority trial of scenario 1 (because of the stronger alternative hypothesis). If there was a requirement (e.g. by regulatory authorities) for a &lt;EM&gt;superiority&lt;/EM&gt; trial in the strong sense, i.e., with a positive superiority margin, this could be done as well, but only for superiority margins &amp;lt;2% and with an even larger sample size. Similar to the limitations of S1, with a margin approaching 2% (from below) the required sample size (for a constant power) grows to infinity. Margins &amp;gt;=2% are infeasible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279880"&gt;@Skillside&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;And if i won't swap order in groupps option and i will change the value of nullpdiff for negative then i will as well change from superiority to noninferiority study?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, changing the sign of the null proportion difference, everything else being the same, switches between "non-inferiority" and "superiority" according to this quote from the &lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_power_details74.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;: "If &lt;EM&gt;p&lt;SUB&gt;0&lt;/SUB&gt;&lt;/EM&gt;&amp;lt;0 in an upper one-sided test or &lt;EM&gt;p&lt;SUB&gt;0&lt;/SUB&gt;&lt;/EM&gt;&amp;gt;0 in a lower one-sided test, then the test is a noninferiority test. If &lt;EM&gt;p&lt;SUB&gt;0&lt;/SUB&gt;&lt;/EM&gt;&amp;gt;0 in an upper one-sided test or &lt;EM&gt;p&lt;SUB&gt;0&lt;/SUB&gt;&lt;/EM&gt;&amp;lt;0 in a lower one-sided test, then the test is a superiority test." I found it helpful to write the SIDES= option of the TWOSAMPLEFREQ statement explicitly in the form&amp;nbsp;&lt;FONT face="courier new,courier"&gt;sides=L&lt;/FONT&gt; or&amp;nbsp;&lt;FONT face="courier new,courier"&gt;sides=U&lt;/FONT&gt; rather than &lt;FONT face="courier new,courier"&gt;sides=1&lt;/FONT&gt; so that the direction of the one-sided test is more obvious. (If you specify a nonsensical or infeasible combination of options, the PROC POWER output will show an "Invalid input" error.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;the drugs do not differ between each other, i either believe that this one with 95% success rate(SR) is superior to drug with 97% SR.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You say that the "drugs do not differ between each other," yet you assume different success rates of 95% vs. 97%? In what sense would the drug with 95% SR be superior to the drug with 97% SR?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;What should i do to decrease the samplesize?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think the starting point should be the research question in view of the regulatory requirements (for example, cf. ICH guideline E9, section 3.3 "Type of Comparison"). A non-inferiority trial showing that the SR of the new drug is only slightly lower (if at all) than that of standard therapy might be justified by advantages of the new drug in other aspects, e.g., safety or cost. As mentioned above, the required sample size will tend to be lower than that for the usual test of the null hypothesis of equal success rates. The larger the non-inferiority margin, the lower the sample size. Of course, the choice of the margin must be clinically well justified. Also the consequences of type I and II errors must be considered carefully. Increasing &lt;FONT face="courier new,courier"&gt;alpha&lt;/FONT&gt; or decreasing the power decreases the sample size. Similar considerations apply to superiority trials in the strong sense.&amp;nbsp;The smaller the superiority margin, the lower the sample size.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 10:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838006#M331366</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-10-12T10:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838276#M331421</link>
      <description>&lt;P&gt;Thank You for your answer, and i am sorry for delay in resposne. Tough day, today &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So if i understood it correctly the following proc will be correct for noninferiority sample size calculation,&lt;/P&gt;
&lt;P&gt;so i cannot set nullpdiff below 2%&lt;/P&gt;
&lt;P&gt;proc power;&lt;BR /&gt;twosamplefreq groupps=(0.97 0.95) alpha=0.025 nullpdiff=0.02 power=0.9&lt;BR /&gt;test=fm sides=1 npergroup=.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;That gives 535 and for nullpdiff is more optimistic 356.&lt;/P&gt;
&lt;P&gt;But then when i calcualte power for Chi-square test it doesn't give the sufficient power.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote: the drugs do not differ between each other, i either believe that this one with 95% success rate(SR) is superior to drug with 97% SR&lt;/P&gt;
&lt;P&gt;Well, they differ between endpoints but i assume that in real life scenario and on the bigger sample it will be the same as first drug or even better.&lt;/P&gt;
&lt;P&gt;I meant that i assume the margin which will show equality or even superiority.&lt;/P&gt;
&lt;P&gt;Could you provide some simulations, please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 17:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838276#M331421</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-12T17:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838277#M331422</link>
      <description>And thank you for providing the link to documentation, but unfortunately, i don't understand most of the equations, i am not mathematician</description>
      <pubDate>Wed, 12 Oct 2022 17:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838277#M331422</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-12T17:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838298#M331438</link>
      <description>&lt;P&gt;You're welcome. I was busy with other things, too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279880"&gt;@Skillside&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So if i understood it correctly the following proc will be correct for noninferiority sample size calculation,&lt;/P&gt;
&lt;P&gt;proc power;&lt;BR /&gt;twosamplefreq groupps=(0.97 0.95) alpha=0.025 nullpdiff=0.02 power=0.9&lt;BR /&gt;test=fm sides=1 npergroup=.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;That gives 535 ...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;so i cannot set nullpdiff below 2%&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not correct. Null proportion differences less than 2% are no problem since the difference &lt;FONT face="courier new,courier"&gt;0.95-0.97=-0.02&lt;/FONT&gt; is still less than any positive number. NULLPDIFF values &lt;FONT face="courier new,courier"&gt;&amp;lt;=&lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;-&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;0.02&lt;/FONT&gt; would be invalid (but for negative values we would be in the situation of a &lt;EM&gt;superiority&lt;/EM&gt; test anyway).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;and for nullpdiff is more optimistic 356.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is the result for nullpdiff=&lt;EM&gt;0.03&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;But then when i calcualte power for Chi-square test it doesn't give the sufficient power.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Sure, because this means &lt;FONT face="courier new,courier"&gt;nullpdiff=&lt;FONT size="4"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;, which is much closer to the assumed true difference&amp;nbsp;&lt;FONT face="courier new,courier"&gt;0.95-0.97=&lt;STRONG&gt;-0.02&lt;/STRONG&gt;&lt;/FONT&gt; than the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;nullpdiff=&lt;STRONG&gt;0.02&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;we used for the non-inferiority test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;Well, they differ between endpoints but i assume that in real life scenario and on the bigger sample it will be the same as first drug or even better.&lt;/P&gt;
&lt;P&gt;I meant that i assume the margin which will show equality or even superiority.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since a &lt;EM&gt;superiority&lt;/EM&gt; test would require an even larger sample size than the equality (chi-square) test, I'd say that we can focus on equality or non-inferiority.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;Could you provide some simulations, please?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here they are: Let's start with the non-inferiority studies corresponding to your PROC POWER step above.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let nsim=10000; /* number of simulated studies */
%let n=535;      /* sample size per group */
%let p1=0.97;    /* success probability in group 1 */
%let p2=0.95;    /* success probability in group 2 */
%let m=0.02;     /* non-inferiority margin (absolute value of the null proportion difference) */

/* Simulate the results of &amp;amp;NSIM studies */

data sim;
call streaminit(3141592);
do i=1 to &amp;amp;nsim;
  do grp=1, 2;
    success=1;
    k=rand('binom', choosen(grp, &amp;amp;p1, &amp;amp;p2), &amp;amp;n);
    output;
    success=0;
    k=&amp;amp;n-k;
    output;
  end;
end;
run;

/* Perform non-inferiority (Farrington-Manning score) test for each study */

ods select none;
ods noresults;
ods output pdiffnoninf=pdni;
proc freq data=sim;
by i;
weight k;
tables grp*success / riskdiff(column=2 method=fm noninf margin=&amp;amp;m);
run;
ods select all;
ods results;

/* Determine the proportion of studies with a significant test result 
   (i.e., showing non-inferiority of the treatment in group 1)
*/

proc format;
value pvone
low-0.025='significant'
0.025&amp;lt;-high='not significant';
run;

ods exclude binomialtest;
proc freq data=pdni;
format pvalue pvone.;
tables pvalue / binomial;
run;
ods exclude none;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result: Point estimate of the power: 0.9123 (exact 95%-CI: 0.9066, 0.9178).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For an equality test the required sample size would be much larger:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc power;
twosamplefreq groupps=(0.97 0.95) alpha=0.05 power=0.9
test=pchi sides=2 npergroup=.;
run; /* --&amp;gt; npergroup=2016 */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The corresponding simulation is similar to the one above:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let nsim=10000; /* number of simulated studies */
%let n=2016;     /* sample size per group */
%let p1=0.97;    /* success probability in group 1 */
%let p2=0.95;    /* success probability in group 2 */

/* Simulate the results of &amp;amp;NSIM studies */

data sim;
call streaminit(31415927);
do i=1 to &amp;amp;nsim;
  do grp=1, 2;
    success=1;
    k=rand('binom', choosen(grp, &amp;amp;p1, &amp;amp;p2), &amp;amp;n);
    output;
    success=0;
    k=&amp;amp;n-k;
    output;
  end;
end;
run;

/* Perform Pearson chi-square test for each study */

ods select none;
ods noresults;
ods output chisq=csq(where=(statistic='Chi-Square'));
proc freq data=sim;
by i;
weight k;
tables grp*success / chisq;
run;
ods select all;
ods results;

/* Determine the proportion of studies with a significant test result 
   (i.e., showing a significant difference between the success rates)
*/

proc format;
value pvtwo
low-0.05='significant'
0.05&amp;lt;-high='not significant';
run;

ods exclude binomialtest;
proc freq data=csq;
format prob pvtwo.;
tables prob / binomial;
run;
ods exclude none;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result: Point estimate of the power: 0.9040 (exact 95%-CI: 0.8981, 0.9097).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, in both cases the intended power of 0.9 was achieved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;And thank you for providing the link to documentation, but unfortunately, i don't understand most of the equations, i am not mathematician&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The important parts at the top of the page are relatively simple. The actual &lt;EM&gt;sample size formulas&lt;/EM&gt; are a bit complicated, but you don't need them as long as you trust PROC POWER. Also, if in doubt, you can ask me. I &lt;EM&gt;am&lt;/EM&gt; a mathematician. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 20:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838298#M331438</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-10-12T20:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838303#M331441</link>
      <description>Great to hear that, i regret that i am not on your level. I was pretty sure that I have some skills in sas, but after a discussion with you I feel like you brought me down on earth. Thanks. &lt;BR /&gt;So let's keep the optimistic variant, and 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? Chi-square assumes no difference, what is the alternative for that? and isn't it give a higher probability of committing a Beta error in that case?</description>
      <pubDate>Wed, 12 Oct 2022 21:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838303#M331441</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-12T21:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838356#M331470</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279880"&gt;@Skillside&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;... 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?&amp;nbsp;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;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 H&lt;SUB&gt;0&lt;/SUB&gt;: p&lt;SUB&gt;1&lt;/SUB&gt;=p&lt;SUB&gt;2&lt;/SUB&gt; (equality of success rates) vs. H&lt;SUB&gt;1&lt;/SUB&gt;: p&lt;SUB&gt;1&lt;/SUB&gt;≠p&lt;SUB&gt;2&lt;/SUB&gt; 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 &lt;EM&gt;equality&lt;/EM&gt; test based on a sample size which is just sufficient for a &lt;EM&gt;non-inferiority&lt;/EM&gt; 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Planning a comparative drug trial with hundreds of participants is a complex endeavor. A responsible &lt;EM&gt;study statistician&lt;/EM&gt; 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838356#M331470</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-10-13T10:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838364#M331474</link>
      <description>&lt;P&gt;Thank you for your all answers FreelanceReinhard,&lt;/P&gt;
&lt;P&gt;Of course if the H&lt;SUB&gt;0&lt;/SUB&gt;: p&lt;SUB&gt;1&lt;/SUB&gt;=p&lt;SUB&gt;2&lt;/SUB&gt; is a true assumption we are probably won't ever know where is the truth before the study.&lt;/P&gt;
&lt;P&gt;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?&lt;/P&gt;
&lt;P&gt;May I ask you, where do you work?&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:35:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838364#M331474</guid>
      <dc:creator>Skillside</dc:creator>
      <dc:date>2022-10-13T10:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838377#M331480</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279880"&gt;@Skillside&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Of course if the H&lt;SUB&gt;0&lt;/SUB&gt;: p&lt;SUB&gt;1&lt;/SUB&gt;=p&lt;SUB&gt;2&lt;/SUB&gt; is a true assumption we are probably won't ever know where is the truth before the study.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Even &lt;EM&gt;after&lt;/EM&gt; the study we won't know the exact true success probabilities p&lt;SUB&gt;1&lt;/SUB&gt;, p&lt;SUB&gt;2&lt;/SUB&gt;. In an equality test we would compute the probability of obtaining the observed or more extreme relative success frequencies under the assumption&amp;nbsp;p&lt;SUB&gt;1&lt;/SUB&gt;=p&lt;SUB&gt;2&lt;/SUB&gt;. If this probability turned out to be &amp;lt;=0.05 (=&lt;FONT face="symbol"&gt;a&lt;/FONT&gt;), we would reject the null hypothesis&amp;nbsp;p&lt;SUB&gt;1&lt;/SUB&gt;=p&lt;SUB&gt;2&lt;/SUB&gt; and conclude that the treatment showing the greater success rates really has a higher success probability, i.e., p&lt;SUB&gt;1&lt;/SUB&gt;&lt;STRONG&gt;≠&lt;/STRONG&gt;p&lt;SUB&gt;2&lt;/SUB&gt;. But we can't know for sure if we committed a type I error by this conclusion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;So in whole disccusion i don't see the point of calculating samplesize for noninferiority/superiority study&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, it was you who asked (in your initial post) "&lt;SPAN&gt;for the simple calculation of sample size for noninferiority or superiority trial."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;isn't it better to calculate samplesize for test which gonna be used at the end?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Exactly. This was the first point in my previous post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;In that case Chi square?&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is the most common test for that purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;May I ask you, where do you work?&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm a freelance Senior Statistical Programmer, based in Germany.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 12:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838377#M331480</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-10-13T12:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size, superiority and noninferiority trial</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838388#M331483</link>
      <description>&lt;A href="http://support.sas.com/kb/48/616.html" target="_blank"&gt;http://support.sas.com/kb/48/616.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://support.sas.com/kb/50/700.html" target="_blank"&gt;http://support.sas.com/kb/50/700.html&lt;/A&gt;</description>
      <pubDate>Thu, 13 Oct 2022 12:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sample-size-superiority-and-noninferiority-trial/m-p/838388#M331483</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-13T12:21:26Z</dc:date>
    </item>
  </channel>
</rss>

