<?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: Logistic regression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462810#M284904</link>
    <description>&lt;P&gt;What do you mean 'the percentages don't match'?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect you may have lost some observations due to missing data in the other variables, you can see this by looking at the top of the results and checking how many observations were used in the model.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/198532"&gt;@sebai&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I want to check the OR of some independent&amp;nbsp;variables in a logistic model.&lt;/P&gt;
&lt;P&gt;I used this model :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc logistic&lt;/STRONG&gt; data=results2 descending;&lt;BR /&gt;where season between 1001 and 3254;&lt;BR /&gt;&lt;STRONG&gt;class&lt;/STRONG&gt;&lt;BR /&gt;source_revenu_cat (param=ref ref='Aucune')&lt;BR /&gt;betail (param=ref ref='auc')&lt;BR /&gt;&lt;FONT color="#993366"&gt;&lt;STRONG&gt;terres_acces (param=ref ref='Non')&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;region (param=ref ref='1-Sud')&lt;BR /&gt;v_urban_rural (param=ref ref='rural')&lt;BR /&gt;etudes_ppt_cat (param=ref ref="A - Jamais allée à l'école")&lt;BR /&gt;personnes_menage_nombre1 (param=ref ref='1 à 3')&lt;BR /&gt;adultes_15_ans_plus (param=ref ref='1 ou plus');&lt;BR /&gt;&lt;STRONG&gt;model MDD_W_5 (event='Oui')&lt;/STRONG&gt;= region v_urban_rural adultes_15_ans_plus source_revenu_cat &lt;STRONG&gt;terres_acces&lt;/STRONG&gt; betail etudes_ppt_cat&lt;/P&gt;
&lt;P&gt;personnes_menage_nombre1 ;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;format&lt;/STRONG&gt; season saison.;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The table of the OR gave me this result; though the percentages don't seem to match !! did I do something&amp;nbsp;wrong with the code or the interpretation ??&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20575iB6B66EC6DD3E4BB8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2018 19:14:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-05-16T19:14:39Z</dc:date>
    <item>
      <title>Logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462804#M284903</link>
      <description>&lt;P&gt;I want to check the OR of some independent&amp;nbsp;variables in a logistic model.&lt;/P&gt;&lt;P&gt;I used this model :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc logistic&lt;/STRONG&gt; data=results2 descending;&lt;BR /&gt;where season between 1001 and 3254;&lt;BR /&gt;&lt;STRONG&gt;class&lt;/STRONG&gt;&lt;BR /&gt;source_revenu_cat (param=ref ref='Aucune')&lt;BR /&gt;betail (param=ref ref='auc')&lt;BR /&gt;&lt;FONT color="#993366"&gt;&lt;STRONG&gt;terres_acces (param=ref ref='Non')&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;region (param=ref ref='1-Sud')&lt;BR /&gt;v_urban_rural (param=ref ref='rural')&lt;BR /&gt;etudes_ppt_cat (param=ref ref="A - Jamais allée à l'école")&lt;BR /&gt;personnes_menage_nombre1 (param=ref ref='1 à 3')&lt;BR /&gt;adultes_15_ans_plus (param=ref ref='1 ou plus');&lt;BR /&gt;&lt;STRONG&gt;model MDD_W_5 (event='Oui')&lt;/STRONG&gt;= region v_urban_rural adultes_15_ans_plus source_revenu_cat &lt;STRONG&gt;terres_acces&lt;/STRONG&gt; betail etudes_ppt_cat&lt;/P&gt;&lt;P&gt;personnes_menage_nombre1 ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;format&lt;/STRONG&gt; season saison.;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The table of the OR gave me this result; though the percentages don't seem to match !! did I do something&amp;nbsp;wrong with the code or the interpretation ??&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20575iB6B66EC6DD3E4BB8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 18:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462804#M284903</guid>
      <dc:creator>sebai</dc:creator>
      <dc:date>2018-05-16T18:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462810#M284904</link>
      <description>&lt;P&gt;What do you mean 'the percentages don't match'?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect you may have lost some observations due to missing data in the other variables, you can see this by looking at the top of the results and checking how many observations were used in the model.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/198532"&gt;@sebai&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I want to check the OR of some independent&amp;nbsp;variables in a logistic model.&lt;/P&gt;
&lt;P&gt;I used this model :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc logistic&lt;/STRONG&gt; data=results2 descending;&lt;BR /&gt;where season between 1001 and 3254;&lt;BR /&gt;&lt;STRONG&gt;class&lt;/STRONG&gt;&lt;BR /&gt;source_revenu_cat (param=ref ref='Aucune')&lt;BR /&gt;betail (param=ref ref='auc')&lt;BR /&gt;&lt;FONT color="#993366"&gt;&lt;STRONG&gt;terres_acces (param=ref ref='Non')&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;region (param=ref ref='1-Sud')&lt;BR /&gt;v_urban_rural (param=ref ref='rural')&lt;BR /&gt;etudes_ppt_cat (param=ref ref="A - Jamais allée à l'école")&lt;BR /&gt;personnes_menage_nombre1 (param=ref ref='1 à 3')&lt;BR /&gt;adultes_15_ans_plus (param=ref ref='1 ou plus');&lt;BR /&gt;&lt;STRONG&gt;model MDD_W_5 (event='Oui')&lt;/STRONG&gt;= region v_urban_rural adultes_15_ans_plus source_revenu_cat &lt;STRONG&gt;terres_acces&lt;/STRONG&gt; betail etudes_ppt_cat&lt;/P&gt;
&lt;P&gt;personnes_menage_nombre1 ;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;format&lt;/STRONG&gt; season saison.;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The table of the OR gave me this result; though the percentages don't seem to match !! did I do something&amp;nbsp;wrong with the code or the interpretation ??&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20575iB6B66EC6DD3E4BB8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 19:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462810#M284904</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-16T19:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462812#M284905</link>
      <description>&lt;P&gt;Actually, all my observations were used I have no missing data.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;By the percentages don't match: I mean that because 24% is higher than 19.1% then &lt;STRONG&gt;the OR should be more than 1, right !!?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 19:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462812#M284905</guid>
      <dc:creator>sebai</dc:creator>
      <dc:date>2018-05-16T19:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462819#M284906</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/198532"&gt;@sebai&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;By the percentages don't match: I mean that because 24% is higher than 19.1% then &lt;STRONG&gt;the OR should be more than 1, right !!?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think your assumption here is incorrect, you can review how Odds Ratio are calculated &lt;A href="http://www.statisticshowto.com/odds-ratio/" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And your output is clearly not the default SAS output, so it's been manipulated somehow already. &lt;STRONG&gt;Check your actual results from the PROC LOGISTIC and you'll see that the output does not include the Odds Ratio of 1 or an estimate for the reference levels.&lt;/STRONG&gt; By default there is no estimate for the reference level, but you're setting it to 1 as the reference level somewhere, which is technically correct. The reference level is assumed to be at 1, since by default the comparisons are to the reference level for categorical data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You set terres_access to have the reference level be NO.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;terres_acces (param=ref ref='Non')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;PS. You do note need to set PARAM=REF for every variable you can include it at the end instead and it applies to all variables. If you have different parameterization methods for variables then you would need to set it individually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class &amp;lt;list of variables and reference levels&amp;gt; / param=ref;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 May 2018 19:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462819#M284906</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-16T19:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462846#M284907</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/198532"&gt;@sebai&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Actually, all my observations were used I have no missing data.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;By the percentages don't match: I mean that because 24% is higher than 19.1% then &lt;STRONG&gt;the OR should be more than 1, right !!?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You are describing a Prevalence Ratio.&lt;/P&gt;
&lt;P&gt;Another link that may help: &lt;A href="https://www.researchgate.net/post/Prevalence_Ratio_Odds_Ratio_and_Relative_Risk" target="_blank"&gt;https://www.researchgate.net/post/Prevalence_Ratio_Odds_Ratio_and_Relative_Risk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 20:42:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logistic-regression/m-p/462846#M284907</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-16T20:42:34Z</dc:date>
    </item>
  </channel>
</rss>

