<?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: PROC POWER - Twosamplefreq NULLPROPORTION in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-POWER-Twosamplefreq-NULLPROPORTION/m-p/723573#M224539</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/330269"&gt;@Clg&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming that you mean NULLPROPORTION&lt;EM&gt;DIFF&lt;/EM&gt;, this is the negative &lt;EM&gt;non-inferiority margin&lt;/EM&gt; in your example, i.e., the −&lt;FONT face="symbol"&gt;d&lt;/FONT&gt; in section&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_freq_details53.htm&amp;amp;locale=en#statug.freq.farmanning" target="_blank" rel="noopener"&gt;Farrington-Manning (Score) Test&lt;/A&gt; of the PROC FREQ documentation (under "Risks and Risk Differences").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Suppose the standard therapy has a response rate of 32% (&lt;FONT face="courier new,courier"&gt;refproportion&lt;/FONT&gt;). The response rate of the new (experimental) therapy is assumed to be 6 percentage points higher (&lt;FONT face="courier new,courier"&gt;proportiondiff&lt;/FONT&gt;), i.e., 38%. The aim of the clinical trial is just to show that it's less than 2 percentage points &lt;EM&gt;lower&lt;/EM&gt;&amp;nbsp;(if not higher, of course) because that would suffice to claim that the new therapy is "not inferior" to the standard therapy -- in the sense that a response rate of, say, 30.1% would still be acceptable (perhaps in view of advantages regarding adverse events, costs, etc.).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your PROC POWER step yields:&lt;/P&gt;
&lt;PRE&gt;Farrington-Manning Score Test for Proportion Difference

               Fixed Scenario Elements

Distribution                         Asymptotic normal
Method                            Normal approximation
Number of Sides                                      U
Null Proportion Difference                       -0.02
Reference (Group 1) Proportion                    0.32
Proportion Difference                             0.06
Nominal Power                                     0.85
Alpha                                             0.05
Group 1 Weight                                       1
Group 2 Weight                                       1


Computed N Total

Actual        N
 Power    Total

 0.850     1022&lt;/PRE&gt;
&lt;P&gt;That is, with n=1022/2=511 patients per group we would expect about 85% of a large number of hypothetical non-inferiority trials to confirm (at the alpha=5% level) that the experimental therapy is not inferior to the standard therapy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's simulate 100,000 of those trials "&lt;STRONG&gt;E&lt;/STRONG&gt;xperimental vs. &lt;STRONG&gt;S&lt;/STRONG&gt;tandard":&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let nsim=100000;
%let n=%eval(1022/2);
%let p1=0.32;
%let pd=0.06;
%let m=0.02; /* PROC FREQ needs the absolute value of the null proportion difference. */

data sim;
call streaminit(27182818);
do i=1 to &amp;amp;nsim;
  do g='E','S';
    resp=1;
    k=rand('binom', &amp;amp;p1+(g='E')*&amp;amp;pd, &amp;amp;n);
    output;
    resp=0;
    k=&amp;amp;n-k;
    output;
  end;
end;
run;

ods select none;
ods noresults;
ods output pdiffnoninf=pdni;
proc freq data=sim;
by i;
weight k;
tables g*resp / riskdiff(column=2 method=fm noninf margin=&amp;amp;m);
run;
ods select all;
ods results;

proc format;
value pv
low-0.05='significant'
0.05&amp;lt;-high='not significant';
run;

ods exclude binomialtest;
proc freq data=pdni;
format pvalue pv.;
tables pvalue / binomial;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                               Pr &amp;gt; Z

                                            Cumulative    Cumulative
         PValue    Frequency     Percent     Frequency      Percent
--------------------------------------------------------------------
significant           85197       85.20         85197        85.20
not significant       14803       14.80        100000       100.00


      Binomial Proportion
      PValue = significant

Proportion                0.8520
ASE                       0.0011
95% Lower Conf Limit      0.8498
95% Upper Conf Limit      0.8542

Exact Conf Limits
95% Lower Conf Limit      0.8498
95% Upper Conf Limit      0.8542

Sample Size = 100000&lt;/PRE&gt;
&lt;P&gt;So, the power (0.85) for the sample size obtained by PROC POWER has been confirmed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Mar 2021 20:08:11 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2021-03-04T20:08:11Z</dc:date>
    <item>
      <title>PROC POWER - Twosamplefreq NULLPROPORTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-POWER-Twosamplefreq-NULLPROPORTION/m-p/723504#M224523</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about an example in the SAS documentation in the proc power.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS code is example below:&lt;/P&gt;&lt;PRE class="xisDoc-code"&gt;proc power;
   twosamplefreq test=fm
      proportiondiff = 0.06
      refproportion = 0.32
      nullproportiondiff = -0.02
      sides = u
      ntotal = .
      power = 0.85;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand when is necessary to put NULLPROPORTION as different of 0 ? What does this mean?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Clg&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 16:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-POWER-Twosamplefreq-NULLPROPORTION/m-p/723504#M224523</guid>
      <dc:creator>Clg</dc:creator>
      <dc:date>2021-03-04T16:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC POWER - Twosamplefreq NULLPROPORTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-POWER-Twosamplefreq-NULLPROPORTION/m-p/723573#M224539</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/330269"&gt;@Clg&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming that you mean NULLPROPORTION&lt;EM&gt;DIFF&lt;/EM&gt;, this is the negative &lt;EM&gt;non-inferiority margin&lt;/EM&gt; in your example, i.e., the −&lt;FONT face="symbol"&gt;d&lt;/FONT&gt; in section&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_freq_details53.htm&amp;amp;locale=en#statug.freq.farmanning" target="_blank" rel="noopener"&gt;Farrington-Manning (Score) Test&lt;/A&gt; of the PROC FREQ documentation (under "Risks and Risk Differences").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Suppose the standard therapy has a response rate of 32% (&lt;FONT face="courier new,courier"&gt;refproportion&lt;/FONT&gt;). The response rate of the new (experimental) therapy is assumed to be 6 percentage points higher (&lt;FONT face="courier new,courier"&gt;proportiondiff&lt;/FONT&gt;), i.e., 38%. The aim of the clinical trial is just to show that it's less than 2 percentage points &lt;EM&gt;lower&lt;/EM&gt;&amp;nbsp;(if not higher, of course) because that would suffice to claim that the new therapy is "not inferior" to the standard therapy -- in the sense that a response rate of, say, 30.1% would still be acceptable (perhaps in view of advantages regarding adverse events, costs, etc.).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your PROC POWER step yields:&lt;/P&gt;
&lt;PRE&gt;Farrington-Manning Score Test for Proportion Difference

               Fixed Scenario Elements

Distribution                         Asymptotic normal
Method                            Normal approximation
Number of Sides                                      U
Null Proportion Difference                       -0.02
Reference (Group 1) Proportion                    0.32
Proportion Difference                             0.06
Nominal Power                                     0.85
Alpha                                             0.05
Group 1 Weight                                       1
Group 2 Weight                                       1


Computed N Total

Actual        N
 Power    Total

 0.850     1022&lt;/PRE&gt;
&lt;P&gt;That is, with n=1022/2=511 patients per group we would expect about 85% of a large number of hypothetical non-inferiority trials to confirm (at the alpha=5% level) that the experimental therapy is not inferior to the standard therapy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's simulate 100,000 of those trials "&lt;STRONG&gt;E&lt;/STRONG&gt;xperimental vs. &lt;STRONG&gt;S&lt;/STRONG&gt;tandard":&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let nsim=100000;
%let n=%eval(1022/2);
%let p1=0.32;
%let pd=0.06;
%let m=0.02; /* PROC FREQ needs the absolute value of the null proportion difference. */

data sim;
call streaminit(27182818);
do i=1 to &amp;amp;nsim;
  do g='E','S';
    resp=1;
    k=rand('binom', &amp;amp;p1+(g='E')*&amp;amp;pd, &amp;amp;n);
    output;
    resp=0;
    k=&amp;amp;n-k;
    output;
  end;
end;
run;

ods select none;
ods noresults;
ods output pdiffnoninf=pdni;
proc freq data=sim;
by i;
weight k;
tables g*resp / riskdiff(column=2 method=fm noninf margin=&amp;amp;m);
run;
ods select all;
ods results;

proc format;
value pv
low-0.05='significant'
0.05&amp;lt;-high='not significant';
run;

ods exclude binomialtest;
proc freq data=pdni;
format pvalue pv.;
tables pvalue / binomial;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                               Pr &amp;gt; Z

                                            Cumulative    Cumulative
         PValue    Frequency     Percent     Frequency      Percent
--------------------------------------------------------------------
significant           85197       85.20         85197        85.20
not significant       14803       14.80        100000       100.00


      Binomial Proportion
      PValue = significant

Proportion                0.8520
ASE                       0.0011
95% Lower Conf Limit      0.8498
95% Upper Conf Limit      0.8542

Exact Conf Limits
95% Lower Conf Limit      0.8498
95% Upper Conf Limit      0.8542

Sample Size = 100000&lt;/PRE&gt;
&lt;P&gt;So, the power (0.85) for the sample size obtained by PROC POWER has been confirmed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 20:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-POWER-Twosamplefreq-NULLPROPORTION/m-p/723573#M224539</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-03-04T20:08:11Z</dc:date>
    </item>
  </channel>
</rss>

