<?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: Proc Logistic categorical variable in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289415#M15353</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/51107"&gt;@TJ87&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but I'd like to be able to use a binary variable for the comparison of interest.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The OddsRatio doesn't give you the correct comparison?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=have;
class var_quartile (ref="1") /param=ref;
model outcome (event="1")= var_quartile; 
oddsratio var_quartile;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 04 Aug 2016 02:55:14 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-08-04T02:55:14Z</dc:date>
    <item>
      <title>Proc Logistic categorical variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289406#M15350</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running Proc Logistic for a continuous variable that I have categorized as quartiles. I seem to get two different answers for the odds ratio estimate of Quartile 4 vs Quartile 1 depending on how I code the variable. The first (standard) program is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc logistic data=have;&lt;BR /&gt;class var_quartile (ref="1") /param=ref;&lt;BR /&gt;model outcome (event="1")= var_quartile; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a second program, I re-coded the predictor as a binary indicator:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data new;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;if var_quartile=4 then var_new=1;&lt;/P&gt;
&lt;P&gt;else if var_quartile=1 then var_new=0;&lt;/P&gt;
&lt;P&gt;else var_new=.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc logistic data=new;&lt;BR /&gt;class var_new (ref="0") /param=ref;&lt;BR /&gt;model outcome (event="1")= var_new; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could someone please tell me why SAS gives me two different answers for the same comparion? Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 01:08:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289406#M15350</guid>
      <dc:creator>TJ87</dc:creator>
      <dc:date>2016-08-04T01:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic categorical variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289409#M15351</link>
      <description>&lt;P&gt;What happens if you run your model as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=have;
where var_quartile in (1, 4);
class var_quartile (ref="1") /param=ref;
model outcome (event="1")= var_quartile; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My guess - a rusty one&amp;nbsp;- is the second model totally excludes the var_new with missing and that's affecting the variance estimates.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 01:16:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289409#M15351</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-04T01:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic categorical variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289412#M15352</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That syntax gives me the same wrong answer as if I had used the indicator variable. I've used dummy variables (Quartile2, Quartile3, Quartile4) to calculate the correct answer, but I'd like to be able to use a binary variable for the comparison of interest. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 01:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289412#M15352</guid>
      <dc:creator>TJ87</dc:creator>
      <dc:date>2016-08-04T01:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic categorical variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289415#M15353</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/51107"&gt;@TJ87&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but I'd like to be able to use a binary variable for the comparison of interest.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The OddsRatio doesn't give you the correct comparison?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=have;
class var_quartile (ref="1") /param=ref;
model outcome (event="1")= var_quartile; 
oddsratio var_quartile;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2016 02:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-categorical-variable/m-p/289415#M15353</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-04T02:55:14Z</dc:date>
    </item>
  </channel>
</rss>

