<?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 How to calculate or get odds ratio (OD) and relative risk (RR) for overall response table? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-or-get-odds-ratio-OD-and-relative-risk-RR-for/m-p/955087#M373002</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to calculate or get odds ratio and relative risk for Overall response table. I have 2 treatment group.&lt;/P&gt;&lt;P&gt;I tried with proc freq,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc freq data=workorr;&lt;BR /&gt;by trt01pn mainord;&lt;BR /&gt;table ord / chisq relrisk;&lt;BR /&gt;weight count;&lt;BR /&gt;output chisq relrisk out=ratio;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/****OR***/&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods output cmh = relrto;&lt;/P&gt;&lt;P&gt;proc freq data=orr2 ;&lt;BR /&gt;by mainord ;&lt;BR /&gt;tables stratan*trt01pn*ord / cmh relrisk;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am not getting in output dataset. I am only getting chi sq. value for first code and p value for second code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got risk diff. (RD) with below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods trace on;&lt;BR /&gt;/*95% CI*/&lt;BR /&gt;proc freq data=workorr;&lt;BR /&gt;by trt01pn mainord ;&lt;BR /&gt;table ord / binomial ;&lt;BR /&gt;exact binomial;&lt;BR /&gt;weight count / zero ; /*add this for zero CI's*/&lt;BR /&gt;output binomial out=orr_ ;&lt;BR /&gt;RUN;&lt;BR /&gt;ods trace off;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please let me know if I am missing something or doing something wrong.&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jan 2025 22:45:05 GMT</pubDate>
    <dc:creator>yogita_patel</dc:creator>
    <dc:date>2025-01-03T22:45:05Z</dc:date>
    <item>
      <title>How to calculate or get odds ratio (OD) and relative risk (RR) for overall response table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-or-get-odds-ratio-OD-and-relative-risk-RR-for/m-p/955087#M373002</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to calculate or get odds ratio and relative risk for Overall response table. I have 2 treatment group.&lt;/P&gt;&lt;P&gt;I tried with proc freq,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc freq data=workorr;&lt;BR /&gt;by trt01pn mainord;&lt;BR /&gt;table ord / chisq relrisk;&lt;BR /&gt;weight count;&lt;BR /&gt;output chisq relrisk out=ratio;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/****OR***/&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods output cmh = relrto;&lt;/P&gt;&lt;P&gt;proc freq data=orr2 ;&lt;BR /&gt;by mainord ;&lt;BR /&gt;tables stratan*trt01pn*ord / cmh relrisk;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am not getting in output dataset. I am only getting chi sq. value for first code and p value for second code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got risk diff. (RD) with below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods trace on;&lt;BR /&gt;/*95% CI*/&lt;BR /&gt;proc freq data=workorr;&lt;BR /&gt;by trt01pn mainord ;&lt;BR /&gt;table ord / binomial ;&lt;BR /&gt;exact binomial;&lt;BR /&gt;weight count / zero ; /*add this for zero CI's*/&lt;BR /&gt;output binomial out=orr_ ;&lt;BR /&gt;RUN;&lt;BR /&gt;ods trace off;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please let me know if I am missing something or doing something wrong.&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 22:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-or-get-odds-ratio-OD-and-relative-risk-RR-for/m-p/955087#M373002</guid>
      <dc:creator>yogita_patel</dc:creator>
      <dc:date>2025-01-03T22:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate or get odds ratio (OD) and relative risk (RR) for overall response table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-or-get-odds-ratio-OD-and-relative-risk-RR-for/m-p/955092#M373006</link>
      <description>Not sure exactly which ones, but I would recommend you google "PROC FREQ ODS TABLE NAMES" and look there for relrisk and OR-related things.</description>
      <pubDate>Sat, 04 Jan 2025 01:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-or-get-odds-ratio-OD-and-relative-risk-RR-for/m-p/955092#M373006</guid>
      <dc:creator>quickbluefish</dc:creator>
      <dc:date>2025-01-04T01:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate or get odds ratio (OD) and relative risk (RR) for overall response table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-or-get-odds-ratio-OD-and-relative-risk-RR-for/m-p/955104#M373012</link>
      <description>&lt;P&gt;OR and RR are all for 2x2 contingency table, so you need 2 category variables with 2 levels to calculated them.&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/23/003.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/23/003.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1735981531762.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103477i0EB05837EF42B68B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1735981531762.png" alt="Ksharp_0-1735981531762.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;For high dimension contingency table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1735981648718.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103478iE20DAF55FF508011/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1735981648718.png" alt="Ksharp_1-1735981648718.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2025 09:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-or-get-odds-ratio-OD-and-relative-risk-RR-for/m-p/955104#M373012</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-01-04T09:07:35Z</dc:date>
    </item>
  </channel>
</rss>

