<?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: How to calculate relative Risk and confidence Interval in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753286#M237388</link>
    <description>So your real question is how to interpret the results from this code?</description>
    <pubDate>Fri, 09 Jul 2021 20:37:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-07-09T20:37:39Z</dc:date>
    <item>
      <title>How to calculate relative Risk and confidence Interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753243#M237377</link>
      <description>&lt;PRE&gt;data MSM2017;
input Alerts $   MSM $  Counts;
Datalines;
No Yes 20
No No 240
Yes Yes 3
Yes No 3
 ;
proc freq data=MSM2017;
tables MSM*Alerts/RELRISK;
WEIGHT COUNTS ;
RUN;&lt;/PRE&gt;
&lt;P&gt;Hi i would like to know what is wrong with the code i have above.&amp;nbsp; There are 3 patients that are&amp;nbsp;MSM&amp;nbsp;and they&amp;nbsp;are Alert, and there are 20 patients that are&amp;nbsp;MSM but they are not&amp;nbsp;alert. There are 3 patients that are Alerts but they are not&amp;nbsp;MSM, and&amp;nbsp;there are 240 patients that are not MSM and Not Alert.&lt;/P&gt;
&lt;P&gt;I would like to know what is risk of being MSM to become an Alert.&amp;nbsp; Is MSM at higher risk of becoming an alert patient?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 17:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753243#M237377</guid>
      <dc:creator>Dhana18</dc:creator>
      <dc:date>2021-07-09T17:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative Risk and confidence Interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753265#M237383</link>
      <description>What makes you think something is wrong with your code? You have a small event size, so I question the reliability of this analysis but from a purely SAS technical standpoint there's no issue with the code you've shown. It runs without errors for me.</description>
      <pubDate>Fri, 09 Jul 2021 19:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753265#M237383</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-09T19:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative Risk and confidence Interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753285#M237387</link>
      <description>I may be not interpreting it well. So what is the risk ratio?  My colleague got RR of 10.57 using excel</description>
      <pubDate>Fri, 09 Jul 2021 20:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753285#M237387</guid>
      <dc:creator>Dhana18</dc:creator>
      <dc:date>2021-07-09T20:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative Risk and confidence Interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753286#M237388</link>
      <description>So your real question is how to interpret the results from this code?</description>
      <pubDate>Fri, 09 Jul 2021 20:37:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753286#M237388</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-09T20:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative Risk and confidence Interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753295#M237391</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/212762"&gt;@Dhana18&lt;/a&gt;,&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/212762"&gt;@Dhana18&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;My colleague got RR of 10.57 using excel&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That value is correct and you'll obtain it also with SAS (for "Column 2," i.e., Alerts='Yes') if you switch the rows of the 2x2 table, i.e., have MSM='Yes' as the first row, so that the relative risk is the risk ratio of MSM='Yes' vs. MSM='No' and not vice versa (which is what you currently get: 0.09465... = &lt;STRONG&gt;1/&lt;/STRONG&gt;10.5652...). One way to achieve this is to sort the dataset as needed and then use the ORDER=DATA option of the PROC FREQ statement.&lt;/P&gt;
&lt;PRE&gt;proc sort data=MSM2017;
by &lt;STRONG&gt;descending MSM&lt;/STRONG&gt; &lt;EM&gt;&lt;FONT color="#800080"&gt;&lt;STRONG&gt;descending Alerts&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/EM&gt;;
run;

proc freq data=MSM2017 &lt;STRONG&gt;order=data&lt;/STRONG&gt;;
tables MSM*Alerts/RELRISK;
WEIGHT COUNTS ;
RUN;&lt;/PRE&gt;
&lt;P&gt;Note however, how wide the 95% confidence interval for this relative risk is (due to the small numbers in column 2, as Reeza mentioned).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Edit:&lt;/U&gt; If you also want to report the &lt;EM&gt;odds ratio&lt;/EM&gt;, you should switch the columns as well (see &lt;EM&gt;&lt;FONT color="#800080"&gt;extended BY statement&lt;/FONT&gt;&lt;/EM&gt; above; the relative risk is then reported as that of "Column 1"). Thanks to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;for pointing this out.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 07:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753295#M237391</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-07-12T07:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative Risk and confidence Interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753396#M237437</link>
      <description>I don’t believe the Alert column is in the right order though?</description>
      <pubDate>Sun, 11 Jul 2021 23:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753396#M237437</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-11T23:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative Risk and confidence Interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753432#M237456</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;, this is a good point if&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/212762"&gt;@Dhana18&lt;/a&gt;&amp;nbsp;plans to report the odds ratio in addition to the relative risk. (The relative risks are computed for both columns, but the odds ratio depends on the order of columns.) I'm going to edit my suggested solution.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 07:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-relative-Risk-and-confidence-Interval/m-p/753432#M237456</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-07-12T07:33:54Z</dc:date>
    </item>
  </channel>
</rss>

