<?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 Percentage of responders for difference between two groups and placebo in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513267#M26217</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help and explain how to calculate "Percentage of responders for two groups and total" using SAS. I need to evaluate efficacy in one experiment. Please see the the table below. Difference and p-value should be calculated just for Visit Final.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24925iB92CBDFA389F051A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Nov 2018 12:31:11 GMT</pubDate>
    <dc:creator>DmytroYermak</dc:creator>
    <dc:date>2018-11-15T12:31:11Z</dc:date>
    <item>
      <title>Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513267#M26217</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help and explain how to calculate "Percentage of responders for two groups and total" using SAS. I need to evaluate efficacy in one experiment. Please see the the table below. Difference and p-value should be calculated just for Visit Final.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24925iB92CBDFA389F051A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 12:31:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513267#M26217</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-11-15T12:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513288#M26219</link>
      <description>&lt;P&gt;Recall that a percentage and a proportion are mathematically equivalent. For example, 75% and the proportion 0.75 are the same.&lt;/P&gt;
&lt;P&gt;It sounds like you want an estimate of the binomial proportion for the two groups. There is &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_examples04.htm&amp;amp;locale=en" target="_self"&gt;an example in the PROC FREQ documentation that you can look at.&lt;/A&gt;&amp;nbsp;The following example shows the general idea for using the BINOMIAL option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=Sashelp.Class;
   tables sex / binomial(level='F');
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: One-Way Frequencies" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Sex&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Frequency&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Percent&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Cumulative&lt;BR /&gt;Frequency&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Cumulative&lt;BR /&gt;Percent&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;F&lt;/TH&gt;
&lt;TD class="r data"&gt;9&lt;/TD&gt;
&lt;TD class="r data"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;47.37&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class="r data"&gt;9&lt;/TD&gt;
&lt;TD class="r data"&gt;47.37&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;M&lt;/TH&gt;
&lt;TD class="r data"&gt;10&lt;/TD&gt;
&lt;TD class="r data"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;52.63&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="r data"&gt;19&lt;/TD&gt;
&lt;TD class="r data"&gt;100.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A name="IDX232" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: Binomial Proportion" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup"&gt;Binomial Proportion&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup"&gt;Sex = F&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Proportion&lt;/TH&gt;
&lt;TD class="r data"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;0.4737&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;ASE&lt;/TH&gt;
&lt;TD class="r data"&gt;0.1145&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;95% Lower Conf Limit&lt;/TH&gt;
&lt;TD class="r data"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.2492&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;95% Upper Conf Limit&lt;/TH&gt;
&lt;TD class="r data"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.6982&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="r data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Exact Conf Limits&lt;/TH&gt;
&lt;TD class="r data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;95% Lower Conf Limit&lt;/TH&gt;
&lt;TD class="r data"&gt;0.2445&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;95% Upper Conf Limit&lt;/TH&gt;
&lt;TD class="r data"&gt;0.7114&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="proctitle"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="c proctitle"&gt;Sample Size = 19&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output tells you that the proportion of females in this sample is 47.37%. A 95% confidence interval for the proportion is [0.2492, 0.6982], or approximately 25% to 70%..&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 13:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513288#M26219</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-11-15T13:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513338#M26221</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for the detailed answer. For me, as for beginner, is not clear how to manage two groups. Using your link I have prepared the example dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   input DoseGroup $ Respond $ @@;
   label DoseGroup  ='Group'
         Respond  ='Respond';
   datalines;
Dose1 Y Dose1 N Dose1 Y Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 N Dose1 N Dose1 Y Dose1 Y
Dose2 Y Dose2 Y Dose2 Y Dose2 N
Dose2 N Dose2 Y Dose2 N Dose2 N
Dose2 N Dose2 N Dose2 Y Dose2 Y
Dose1 Y Dose1 N Dose1 Y Dose1 Y
Dose1 Y Dose1 Y Dose2 N Dose1 Y
Dose1 N Dose1 N Dose2 Y Dose1 Y
Dose2 Y Dose2 Y Dose2 Y Dose2 N
Dose2 N Dose2 Y Dose2 N Dose2 N
Dose2 N Dose2 N Dose2 Y Dose2 Y
Dose1 Y Dose1 N Dose1 Y Dose1 Y
Dose1 N Dose1 N Dose2 Y Dose1 Y
Dose2 Y Dose2 Y Dose2 Y Dose2 N
Dose2 Y Dose2 Y Dose2 N Dose2 Y
Dose2 N Dose2 N Dose2 Y Dose2 Y
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Could you please use it for the analysis? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the case in &lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;graphic view:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24936iF22029E2365673DD/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.jpg" alt="3.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 14:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513338#M26221</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-11-15T14:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513358#M26222</link>
      <description>&lt;P&gt;If you want to perform three separate analysis of the proportions (All, DoseGroup='Dose1', DoseGroup='Dose2'), then you can use the following.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=test; by DoseGroup; run;

title "Estimate and CI for Total Proportion";
title2 "All Groupts";
proc freq data=test;
   table Respond / binomial(level='Y');
run;

title "Estimate and CI by Groups";
proc freq data=test;
   by DoseGroup;
   table Respond / binomial(level='Y');
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The results are&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ALL 0.6029&amp;nbsp; CI (0.4866, 0.7192)&lt;/P&gt;
&lt;P&gt;Dose1&amp;nbsp;0.6429 CI (0.4407,&amp;nbsp;0.8136)&lt;/P&gt;
&lt;P&gt;Dose2&amp;nbsp;0.5750 CI (0.4218, 0.7282)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't comment on the p-value because I don't know what statistical test you want to run. If you are testing whether the proportions are 0.5, then see the one-sided or two-sided p-values in the "Test of H0" tables in the output.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 15:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513358#M26222</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-11-15T15:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513380#M26223</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Pearson Chi-square test should be used and the 95% confidence interval (asymptotic calculation) for each treatment &lt;/STRONG&gt;&lt;STRONG&gt;difference&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please prompt how to specify the requirements in the Proc Freq? Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 15:52:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513380#M26223</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-11-15T15:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513386#M26224</link>
      <description>&lt;P&gt;There are several ways you can make this comparison. The RISKDIFF option in PROC FREQ compares the two proportions. Also, you can fit a simple logistic model and use the LSMEANS statement to make the comparison. Finally, the &lt;A href="http://support.sas.com/kb/63038" target="_self"&gt;Margins macro&lt;/A&gt; also fits a logistic model and does the comparison of Dosegroup margins, which are the proportions. They all provide the separate proportions and a test or confidence interval comparing them, all indicating no significant difference. Code for all three methods follow. But note that your table shows that there is a Placebo group. A proper analysis would include the data for that group. If that data is included, you could still use the PROC LOGISTIC and Margins macro approaches to make comparisons among the three groups.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=test;
table dosegroup*respond / riskdiff;
run;

proc logistic data=test;
class dosegroup / param=glm;
model respond(event='Y')=dosegroup;
lsmeans dosegroup / ilink diff cl;
run;

data test; set test; y=(respond='Y'); run;
%margins(data     = test,
          class    = dosegroup,
          response = y,
          roptions = event='1',
          model    = dosegroup,
          dist     = binomial,
          margins  = dosegroup, 
          options  = cl diff nomodel)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513386#M26224</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-11-15T16:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513387#M26225</link>
      <description>&lt;P&gt;For a one-way table, &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_details08.htm&amp;amp;locale=en" target="_self"&gt;the CHISQ option&lt;/A&gt;&amp;nbsp;performs a chi-square test for equal proportions.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513387#M26225</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-11-15T16:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513406#M26226</link>
      <description>Thank you!</description>
      <pubDate>Thu, 15 Nov 2018 16:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513406#M26226</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-11-15T16:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513407#M26227</link>
      <description>&lt;P&gt;I have added the Placebo group. Could you please specify the 'Proc Logistic' for the three groups and placebo? Thank you!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   input DoseGroup $ Respond $ @@;
   label DoseGroup  ='Group'
         Respond  ='Respond';
   datalines;
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose1 Y Dose1 N Dose1 Y Placebo Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Placebo N Placebo N Dose1 Y Dose1 Y
Dose2 Y Placebo Y Dose2 Y Dose2 N
Placebo N Dose2 Y Dose2 N Dose2 N
Dose2 N Dose2 N Placebo Y Dose2 Y
Placebo N Placebo N Dose1 Y Dose1 Y
Dose2 Y Placebo Y Dose2 Y Dose2 N
Placebo N Dose2 Y Dose2 N Dose2 N
Dose2 N Dose2 N Placebo Y Dose2 Y
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose1 Y Placebo Y Dose2 N Dose1 Y
Dose1 N Dose1 N Dose2 Y Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 N Placebo N Dose2 Y Dose1 Y
Dose2 Y Dose2 Y Placebo Y Dose2 N
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose2 Y Placebo Y Dose2 N Placebo Y
Dose1 Y Placebo Y Dose2 N Dose1 Y
Dose1 N Dose1 N Dose2 Y Dose1 Y
Dose1 N Placebo N Dose2 Y Dose1 Y
Dose1 Y Placebo Y Dose1 N Dose1 Y
Dose1 Y Placebo Y Dose1 N Dose1 Y
Dose2 Y Dose2 Y Placebo Y Dose2 N
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 Y Placebo Y Dose1 N Dose1 Y
Dose2 Y Placebo Y Dose2 N Placebo Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose2 N Placebo N Placebo Y Dose2 Y
Placebo Y Dose2 Y Dose2 Y Dose2 N
Dose2 N Dose2 Y Placebo N Dose2 N
Dose2 N Dose2 N Dose2 Y Dose2 Y
Dose1 Y Dose1 N Dose1 Y Dose1 Y
Dose1 N Placebo N Dose2 Y Dose1 Y
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose2 Y Dose2 Y Placebo Y Dose2 N
Dose2 Y Placebo Y Dose2 N Placebo Y
Dose2 N Placebo N Placebo Y Dose2 Y
;
run;

proc logistic data=test;
class dosegroup / param=glm;
model respond(event='Y')=dosegroup;
lsmeans dosegroup / ilink diff cl;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:18:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513407#M26227</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-11-15T16:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513415#M26229</link>
      <description>&lt;P&gt;You can run the code exactly as you showed it. The two Least Squares Means tables give you the three group proportions and the pairwise comparisons.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you are assuming that the responses in the three groups are all independent.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513415#M26229</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-11-15T16:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513434#M26230</link>
      <description>&lt;P&gt;Thank you. It gradually(and slowly) becomes more and more clear). I have a question - how to specify CI not 95% but different one?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 17:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513434#M26230</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-11-15T17:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513439#M26231</link>
      <description>Use the ALPHA= option in the LSMEANS statement.</description>
      <pubDate>Thu, 15 Nov 2018 16:53:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513439#M26231</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-11-15T16:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513457#M26232</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the second question: what is the syntax of Proc Freq for the same purpose? I saw the link provided in the topic but need some help anyway (.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I'm running the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=test;
table dosegroup*respond / riskdiff;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I receive just frequency table.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 17:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513457#M26232</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-11-15T17:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513519#M26234</link>
      <description>&lt;P&gt;The RISKDIFF option only applies to a 2x2 table. So, it is only available for a two group case. See the note in the SAS log that specifically says this when you run that code. That's why I said that when you use all the data with all three groups, you can use the PROC LOGISTIC or Margins macro approaches.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 18:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513519#M26234</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-11-15T18:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513799#M26245</link>
      <description>&lt;P&gt;Thank you, Dave. Is the criteria in Proc Logistics - CHISQ?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 11:27:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513799#M26245</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-11-16T11:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513902#M26247</link>
      <description>&lt;P&gt;Many different types of tests use the chi-square distribution and can be called chi-square tests. The overall test of any differences among the Dosegroup levels that appears in the Type 3 tests table is one such. The pairwise comparisons in the Differences of Least Squares Means table are, as labeled, large-sample Z tests which use the normal distribution. But the same p-value results from an equivalent chi-square test (with 1 df) that could be produced by simply squaring the Z statistic.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 14:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/513902#M26247</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-11-16T14:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of responders for difference between two groups and placebo</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/517994#M26395</link>
      <description>&lt;P&gt;Please see another solution. It is just for one group and should be calculated for all:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   input DoseGroup $ Response $ @@;
   label DoseGroup  ='Group'
         Respond  ='Respond';
   datalines;
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose1 Y Dose1 N Dose1 Y Placebo Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Placebo N Placebo N Dose1 Y Dose1 Y
Dose2 Y Placebo Y Dose2 Y Dose2 N
Placebo N Dose2 Y Dose2 N Dose2 N
Dose2 N Dose2 N Placebo Y Dose2 Y
Placebo N Placebo N Dose1 Y Dose1 Y
Dose2 Y Placebo Y Dose2 Y Dose2 N
Placebo N Dose2 Y Dose2 N Dose2 N
Dose2 N Dose2 N Placebo Y Dose2 Y
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose1 Y Placebo Y Dose2 N Dose1 Y
Dose1 N Dose1 N Dose2 Y Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 N Placebo N Dose2 Y Dose1 Y
Dose2 Y Dose2 Y Placebo Y Dose2 N
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose2 Y Placebo Y Dose2 N Placebo Y
Dose1 Y Placebo Y Dose2 N Dose1 Y
Dose1 N Dose1 N Dose2 Y Dose1 Y
Dose1 N Placebo N Dose2 Y Dose1 Y
Dose1 Y Placebo Y Dose1 N Dose1 Y
Dose1 Y Placebo Y Dose1 N Dose1 Y
Dose2 Y Dose2 Y Placebo Y Dose2 N
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Dose1 Y Placebo Y Dose1 N Dose1 Y
Dose2 Y Placebo Y Dose2 N Placebo Y
Dose1 Y Dose2 Y Dose1 N Dose1 Y
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose2 N Placebo N Placebo Y Dose2 Y
Placebo Y Dose2 Y Dose2 Y Dose2 N
Dose2 N Dose2 Y Placebo N Dose2 N
Dose2 N Dose2 N Dose2 Y Dose2 Y
Dose1 Y Dose1 N Dose1 Y Dose1 Y
Dose1 N Placebo N Dose2 Y Dose1 Y
Placebo Y Placebo N Dose1 Y Placebo Y
Placebo N Placebo N Dose2 Y Placebo Y
Dose2 Y Dose2 Y Placebo Y Dose2 N
Dose2 Y Placebo Y Dose2 N Placebo Y
Dose2 N Placebo N Placebo Y Dose2 Y
;
run;

proc sql;
create table contingence as
select distinct dosegroup, response, count(*) as Count
from test
where DoseGroup in ("Dose1" "Placebo")
group by dosegroup,response;
quit;

proc freq data=contingence order=data;
  tables DoseGroup*Response / chisq relrisk ;
  exact pchi or;
  weight Count;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled1.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25326iA331D8DE75B76DA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled1.jpg" alt="Untitled1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 09:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Percentage-of-responders-for-difference-between-two-groups-and/m-p/517994#M26395</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-12-03T09:33:10Z</dc:date>
    </item>
  </channel>
</rss>

