<?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: Confidence interval for a relative risk in a 2x2 table - using PROC PHREG in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-interval-for-a-relative-risk-in-a-2x2-table-using/m-p/397830#M20748</link>
    <description>&lt;P&gt;I get errors in the log when I run your code, but output in results viewer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you checked your log to make sure the program is running as it should?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2017 17:01:43 GMT</pubDate>
    <dc:creator>Norman21</dc:creator>
    <dc:date>2017-09-21T17:01:43Z</dc:date>
    <item>
      <title>Confidence interval for a relative risk in a 2x2 table - using PROC PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-interval-for-a-relative-risk-in-a-2x2-table-using/m-p/396849#M20693</link>
      <description>&lt;P&gt;I want to calculate the confidence interval for a relative risk in a 2x2 table (X * Y).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a reason - not relevant for this topic - I would like to use PROC PHREG to accomplish this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Strangely, with PROC PHREG I only get the same confidence interval as with procedure PROC FREQ or PROC GENMOD,&lt;BR /&gt;when I use the EVENTCODE=1 option in PHREG. Since there are only two possible levels for Y (0/1), I do not understand&lt;BR /&gt;how this option can have an impact on the&amp;nbsp;result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do not use &lt;SPAN&gt;&amp;nbsp;the EVENTCODE=1 option&lt;/SPAN&gt;, the confidence interval for the relative risk is much wider and seems inappropriate given the discrepancy with the results from PROC FREQ and PROC GENMOD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions are more than welcome!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*simulate data such the the relative risk equals 1.5 (60% if x=1 versus 40% if x=0)*/
data test;
do x=0 to 1;
 do id=1 to 100;
  if x=0 then  y=(id&amp;gt;40);
  if x=1 then  y=(id&amp;gt;60);
  output;
 end;
end;
run;

title 'Using PROC FREQ';
ods select none;
proc freq data=test;
 tables x*y/nocol  nocum nopercent relrisk  ;
 ods output relativerisks=relrisk_FREQ;
run;
ods select all;
proc print data=relrisk_FREQ noobs label; var value LowerCL UpperCL;where statistic="Relative Risk (Column 2)";format _numeric_ 8.5;run;

title 'Using PROC GENMOD';
ods select none;
proc genmod data=test ;
 model y=x/dist=bin link=log;
 estimate 'RR' x 1/exp;
 ods output estimates=relrisk_GENMOD;
run;
ods select all;
proc print data=relrisk_GENMOD noobs label; where label="Exp(RR)";var LBetaEstimate LBetaLowerCL LBetaUpperCL;format _numeric_ 8.5;run;

title 'Using PROC PHREG - with eventcode specification';
ods select none;
data test;set test;FUtime=1;run;
proc phreg data=test;
class x;
model FUtime*y(0)=x/eventcode=1 rl;
ods output parameterestimates=RR_phreg;
run;
ods select all;
proc print data=RR_phreg noobs;var hazardratio HRLowerCL HRUpperCL;format _numeric_ 8.5;run;

title 'Using PROC PHREG - without eventcode specification';
ods select none;
data test;set test;FUtime=1;run;
proc phreg data=test;
class x;
model FUtime*y(0)=x/ rl;
ods output parameterestimates=RR_phreg;
run;
ods select all;
proc print data=RR_phreg noobs;var hazardratio HRLowerCL HRUpperCL;format _numeric_ 8.5;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Sep 2017 15:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Confidence-interval-for-a-relative-risk-in-a-2x2-table-using/m-p/396849#M20693</guid>
      <dc:creator>SteffenF</dc:creator>
      <dc:date>2017-09-18T15:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Confidence interval for a relative risk in a 2x2 table - using PROC PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-interval-for-a-relative-risk-in-a-2x2-table-using/m-p/397830#M20748</link>
      <description>&lt;P&gt;I get errors in the log when I run your code, but output in results viewer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you checked your log to make sure the program is running as it should?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 17:01:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Confidence-interval-for-a-relative-risk-in-a-2x2-table-using/m-p/397830#M20748</guid>
      <dc:creator>Norman21</dc:creator>
      <dc:date>2017-09-21T17:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Confidence interval for a relative risk in a 2x2 table - using PROC PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-interval-for-a-relative-risk-in-a-2x2-table-using/m-p/398004#M20753</link>
      <description>&lt;P&gt;Dear Norman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not get any error in the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The version I'm working with is&amp;nbsp;&lt;SPAN&gt;SAS 9.4 (TS1M3) X64_8PRO WIN 6.2.9200 (hence, slightly different)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Steffen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 07:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Confidence-interval-for-a-relative-risk-in-a-2x2-table-using/m-p/398004#M20753</guid>
      <dc:creator>SteffenF</dc:creator>
      <dc:date>2017-09-22T07:04:15Z</dc:date>
    </item>
  </channel>
</rss>

