<?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 SAS Code for Adjusted and Weighted Relative Risk using Large Survey Data in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/SAS-Code-for-Adjusted-and-Weighted-Relative-Risk-using-Large/m-p/609780#M8454</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for help with my SAS code from anyone who is willing to provide advice! I am not an expert with code, so you will have to really dumb it down and be clear about what I should do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a large survey dataset of 30,000 people. I am using SAS Studio University edition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exposure: Obesity (binary categorical: 0=not obese, 1=obese)&lt;/P&gt;&lt;P&gt;Outcome: visit to a doctor (binary categorical: 0=no, 1=yes)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to adjust my data for various confounders and my data needs to be weighted. I have previously used a strata and weight statement when computing odds ratios using 'proc surveylogistic', and I know that I weighted my data properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;QUESTION #1: What proc statement should I use to compute adjusted and weighted risk ratios? (please provide me with clear code where I can just put in my variables, I won't understand if you try and explain it to me)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;QUESTION #2: I have tried to use PROC GENMOD with weights and without adjusting for any confounders but Im running into warning a statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data= DATASET ;&lt;BR /&gt;class OBESITY (ref='0') DOCTOR (ref='0');&lt;BR /&gt;model DOCTOR (event='1')=OBESITY / dist = binomial link = log;&lt;BR /&gt;strata WEIGHT_GEO;&lt;BR /&gt;weight WEIGHT_ANALYTIC;&lt;BR /&gt;estimate 'Beta' OBESITY 1 -1/ exp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The warning statement I'm getting when I run this is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: The STRATA statement is valid only for an exact analysis specified with an EXACT statement. The statement is ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure how to write an exact statement or where it should go in my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLEASE HELP ASAP!!!!&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2019 19:16:27 GMT</pubDate>
    <dc:creator>andreaat</dc:creator>
    <dc:date>2019-12-05T19:16:27Z</dc:date>
    <item>
      <title>SAS Code for Adjusted and Weighted Relative Risk using Large Survey Data</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Code-for-Adjusted-and-Weighted-Relative-Risk-using-Large/m-p/609780#M8454</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for help with my SAS code from anyone who is willing to provide advice! I am not an expert with code, so you will have to really dumb it down and be clear about what I should do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a large survey dataset of 30,000 people. I am using SAS Studio University edition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exposure: Obesity (binary categorical: 0=not obese, 1=obese)&lt;/P&gt;&lt;P&gt;Outcome: visit to a doctor (binary categorical: 0=no, 1=yes)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to adjust my data for various confounders and my data needs to be weighted. I have previously used a strata and weight statement when computing odds ratios using 'proc surveylogistic', and I know that I weighted my data properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;QUESTION #1: What proc statement should I use to compute adjusted and weighted risk ratios? (please provide me with clear code where I can just put in my variables, I won't understand if you try and explain it to me)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;QUESTION #2: I have tried to use PROC GENMOD with weights and without adjusting for any confounders but Im running into warning a statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data= DATASET ;&lt;BR /&gt;class OBESITY (ref='0') DOCTOR (ref='0');&lt;BR /&gt;model DOCTOR (event='1')=OBESITY / dist = binomial link = log;&lt;BR /&gt;strata WEIGHT_GEO;&lt;BR /&gt;weight WEIGHT_ANALYTIC;&lt;BR /&gt;estimate 'Beta' OBESITY 1 -1/ exp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The warning statement I'm getting when I run this is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: The STRATA statement is valid only for an exact analysis specified with an EXACT statement. The statement is ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure how to write an exact statement or where it should go in my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLEASE HELP ASAP!!!!&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 19:16:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Code-for-Adjusted-and-Weighted-Relative-Risk-using-Large/m-p/609780#M8454</guid>
      <dc:creator>andreaat</dc:creator>
      <dc:date>2019-12-05T19:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code for Adjusted and Weighted Relative Risk using Large Survey Data</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Code-for-Adjusted-and-Weighted-Relative-Risk-using-Large/m-p/610510#M8477</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/254087"&gt;@andreaat&lt;/a&gt; - I'm not extremely comfortable with PROC GENMOD but found this article (&lt;A href="https://academic.oup.com/aje/article/162/3/199/171116" target="_blank"&gt;https://academic.oup.com/aje/article/162/3/199/171116&lt;/A&gt;) which provides the following code.&amp;nbsp; The authors also provide a link to a macro that should help.&amp;nbsp; Hopefully this answers your question.&amp;nbsp; If you can post your sample data, that'll help any other members answer your question.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod descending;
model death=receptor stage2 stage3/dist=bin link=log;
estimate ‘RR receptor low vs. high’ receptor 1/exp;
estimate ‘RR stage2 vs stage1’ stage2 1/exp;
estimate ‘RR stage 3 vs stage1’ stage3 1/exp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 16:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Code-for-Adjusted-and-Weighted-Relative-Risk-using-Large/m-p/610510#M8477</guid>
      <dc:creator>DarthPathos</dc:creator>
      <dc:date>2019-12-09T16:59:35Z</dc:date>
    </item>
  </channel>
</rss>

