<?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: calculating the OR for Categorical Variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262281#M13866</link>
    <description>&lt;P&gt;Your dataset only has one value for Exercise so you have 2X1 table?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should really post sample data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a worked through example of logistic regression that is really similar to what you're trying to do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/dae/logit.htm" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/dae/logit.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My only suggestion would be to change the model line to add the expb option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;model admit = gre gpa rank/expb;&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;expb provides the exponentiated value of the estimates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2016 03:28:35 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-04-08T03:28:35Z</dc:date>
    <item>
      <title>calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262238#M13862</link>
      <description>&lt;P&gt;How do you write a code in SAS that will enable you to calculate the odds ratio (OR) for a categorical variable such as BMI?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 23:29:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262238#M13862</guid>
      <dc:creator>bathshebat</dc:creator>
      <dc:date>2016-04-07T23:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262239#M13863</link>
      <description>&lt;P&gt;Depends a bit on what you're trying to do, but either proc freq or proc logistic are good starting points.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If if you need more help, please post some sample data and explain what you're trying to calculate.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation has good examples and example data if you can't provide your actual data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 23:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262239#M13863</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-07T23:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262265#M13864</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply. I have a data set&amp;nbsp;containing a variable called&amp;nbsp;BMI&amp;nbsp;(a categorical variable with 3 levels: normal, overweight and obese) and a variable called Exercise (a categorical variable with 3 levels: not answered, yes, and no). I want to determine which BMI group has the highest odds of not exercising. I am trying to compare the odds ratios for each group but the codes I have&amp;nbsp;tried to run aren't producing the odds ratio. I have tried the following code to no avail:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data=answer2;&lt;/P&gt;&lt;P&gt;set answer;&lt;/P&gt;&lt;P&gt;if Exercise = 3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=answer;&lt;/P&gt;&lt;P&gt;tables Exercise * BMI / OR;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 02:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262265#M13864</guid>
      <dc:creator>bathshebat</dc:creator>
      <dc:date>2016-04-08T02:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262272#M13865</link>
      <description>&lt;P&gt;That is because your contingency table is 3x3 not 2x2 .&lt;/P&gt;
&lt;P&gt;Try to use General Logistical Regression .&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 02:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262272#M13865</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-08T02:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262281#M13866</link>
      <description>&lt;P&gt;Your dataset only has one value for Exercise so you have 2X1 table?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should really post sample data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a worked through example of logistic regression that is really similar to what you're trying to do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/dae/logit.htm" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/dae/logit.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My only suggestion would be to change the model line to add the expb option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;model admit = gre gpa rank/expb;&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;expb provides the exponentiated value of the estimates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 03:28:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262281#M13866</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-08T03:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262475#M13871</link>
      <description>&lt;P&gt;Any chance your data is from BRFSS or similar complex structured survey? If so you'll want to use Proc SurveyLogistic to use the sampling information correctly.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 15:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262475#M13871</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-08T15:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262710#M13873</link>
      <description>&lt;P&gt;Thank you Xia. I will try that.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2016 01:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262710#M13873</guid>
      <dc:creator>bathshebat</dc:creator>
      <dc:date>2016-04-10T01:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262711#M13874</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;&amp;nbsp;Yes it is BRFSS data. I will try that as well. Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2016 01:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262711#M13874</guid>
      <dc:creator>bathshebat</dc:creator>
      <dc:date>2016-04-10T01:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: calculating the OR for Categorical Variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262712#M13875</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt;&amp;nbsp;Thank you very much for your assistance.&amp;nbsp;I am making progress. Lol.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2016 01:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/calculating-the-OR-for-Categorical-Variables/m-p/262712#M13875</guid>
      <dc:creator>bathshebat</dc:creator>
      <dc:date>2016-04-10T01:04:33Z</dc:date>
    </item>
  </channel>
</rss>

