<?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 Using contrast in proc logistic in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454477#M114864</link>
    <description>&lt;P&gt;I want to use contrast in proc logistic, but I don’t seem to clearly understand where the numbers in the contrast statement come from.&lt;/P&gt;&lt;P&gt;My model include:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Region: variable with 3 categories (1-Sud; 2-GAE; 3-GAO)&lt;/LI&gt;&lt;LI&gt;Land access: variable with 2 categories (‘NO’; ‘Wi’)&lt;/LI&gt;&lt;LI&gt;Season: variable with 2 categories (Spring; Summer)&lt;/LI&gt;&lt;LI&gt;AND my dependent variable IDE: with 3 categories&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want to do contrast for the interaction between season and land access; and a second contrast statement for the interaction between region and season:&lt;/P&gt;&lt;P&gt;My model (without the contrast) is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;logistic&lt;/STRONG&gt; data = results2;&lt;/P&gt;&lt;P&gt;Class Land_acces (param=ref ref='Non')&lt;/P&gt;&lt;P&gt;region (param=ref ref='1-Sud')&lt;/P&gt;&lt;P&gt;season (param=ref ref='spring') / param=ref order=internal;&amp;nbsp;&lt;/P&gt;&lt;P&gt;model IDE_groupe(event='A - Peu ou pas de faim dans le ménage')=&lt;/P&gt;&lt;P&gt;season&lt;/P&gt;&lt;P&gt;Land_acces&lt;/P&gt;&lt;P&gt;region&lt;/P&gt;&lt;P&gt;Land_acces * season&lt;/P&gt;&lt;P&gt;region * season/ expb;&lt;/P&gt;&lt;P&gt;format season saison.;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 254px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19835i48A2D00283AFBD85/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;UL&gt;&lt;LI&gt;Should I use this table (I got after running the code for proc logistic) to write the contrast statement?&lt;/LI&gt;&lt;LI&gt;What should I write in the contrast statement to have a table like this:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Region*season&lt;/P&gt;&lt;P&gt;Land_acces*season&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 575px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19837i818F1C68681C6A0A/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;P&gt;contrast 'region = 1-Sud season summer vs spring' region*season ……………… / estimate = exp ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;contrast 'region = 2-GAE season summer vs spring' region*season ……………… / estimate = exp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;contrast 'region = 3-GAO season summer vs spring' region*season ………………/ estimate = exp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;contrast ' Land_acces = Non season summer vs spring' Land_acces*season ……………… / estimate = exp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;contrast ' Land_acces = Wi season summer vs spring' Land_acces* season ………………/ estimate = exp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Apr 2018 15:34:26 GMT</pubDate>
    <dc:creator>sebai</dc:creator>
    <dc:date>2018-04-16T15:34:26Z</dc:date>
    <item>
      <title>Using contrast in proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454477#M114864</link>
      <description>&lt;P&gt;I want to use contrast in proc logistic, but I don’t seem to clearly understand where the numbers in the contrast statement come from.&lt;/P&gt;&lt;P&gt;My model include:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Region: variable with 3 categories (1-Sud; 2-GAE; 3-GAO)&lt;/LI&gt;&lt;LI&gt;Land access: variable with 2 categories (‘NO’; ‘Wi’)&lt;/LI&gt;&lt;LI&gt;Season: variable with 2 categories (Spring; Summer)&lt;/LI&gt;&lt;LI&gt;AND my dependent variable IDE: with 3 categories&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want to do contrast for the interaction between season and land access; and a second contrast statement for the interaction between region and season:&lt;/P&gt;&lt;P&gt;My model (without the contrast) is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;logistic&lt;/STRONG&gt; data = results2;&lt;/P&gt;&lt;P&gt;Class Land_acces (param=ref ref='Non')&lt;/P&gt;&lt;P&gt;region (param=ref ref='1-Sud')&lt;/P&gt;&lt;P&gt;season (param=ref ref='spring') / param=ref order=internal;&amp;nbsp;&lt;/P&gt;&lt;P&gt;model IDE_groupe(event='A - Peu ou pas de faim dans le ménage')=&lt;/P&gt;&lt;P&gt;season&lt;/P&gt;&lt;P&gt;Land_acces&lt;/P&gt;&lt;P&gt;region&lt;/P&gt;&lt;P&gt;Land_acces * season&lt;/P&gt;&lt;P&gt;region * season/ expb;&lt;/P&gt;&lt;P&gt;format season saison.;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 254px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19835i48A2D00283AFBD85/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;UL&gt;&lt;LI&gt;Should I use this table (I got after running the code for proc logistic) to write the contrast statement?&lt;/LI&gt;&lt;LI&gt;What should I write in the contrast statement to have a table like this:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Region*season&lt;/P&gt;&lt;P&gt;Land_acces*season&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 575px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19837i818F1C68681C6A0A/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;P&gt;contrast 'region = 1-Sud season summer vs spring' region*season ……………… / estimate = exp ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;contrast 'region = 2-GAE season summer vs spring' region*season ……………… / estimate = exp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;contrast 'region = 3-GAO season summer vs spring' region*season ………………/ estimate = exp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;contrast ' Land_acces = Non season summer vs spring' Land_acces*season ……………… / estimate = exp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;contrast ' Land_acces = Wi season summer vs spring' Land_acces* season ………………/ estimate = exp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:34:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454477#M114864</guid>
      <dc:creator>sebai</dc:creator>
      <dc:date>2018-04-16T15:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using contrast in proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454483#M114867</link>
      <description>&lt;P&gt;There's no point in using a CONTRAST statement to compare one level to another level. You can use the LSMEANS statements to compare the means of interest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CONTRAST statement would be useful if you want to compare some non-trivial linear combinations of the means levels; such as the average of groups 2 and 3, with the average of group 1.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:37:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454483#M114867</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-16T15:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using contrast in proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454484#M114868</link>
      <description>&lt;P&gt;Can you use an ODDSRATIO statement instead? I find those much easier to navigate.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454484#M114868</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-16T15:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using contrast in proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454503#M114874</link>
      <description>&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;Logistic&lt;/STRONG&gt; data=results2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class region season terres_acces;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model IDE_groupe = region season&lt;/P&gt;&lt;P&gt;terres_acces&lt;/P&gt;&lt;P&gt;terres_acces * season&lt;/P&gt;&lt;P&gt;region * season / cl ;&lt;/P&gt;&lt;P&gt;lsmeans region*season / oddsratio ilink cl pdiff;&lt;/P&gt;&lt;P&gt;lsmeans terres_acces*season / oddsratio cl pdiff;&lt;/P&gt;&lt;P&gt;format season saison.;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;I used this code and I got this table:&lt;/P&gt;&lt;P&gt;It doesn’t include all the levels for the 2 variables: for region, I only got 1-Sud, 2-GAE and not 3-GAO (I think it did a comparison with that level of the variable though I want it to be compared separately).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 576px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19840iC9E6356174664716/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;P&gt;I used Lsmeans with &lt;STRONG&gt;proc &lt;/STRONG&gt;glimmix and it worked very well but it was for another dependent variable with 2 categories; proc glimmix didn’t work well for me with a dependent variable with 3 categories.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;glimmix&lt;/STRONG&gt; data=results2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class region&lt;/P&gt;&lt;P&gt;season&lt;/P&gt;&lt;P&gt;terres_acces;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model MDD_W_5 = region season&lt;/P&gt;&lt;P&gt;terres_acces&lt;/P&gt;&lt;P&gt;terres_acces * season&lt;/P&gt;&lt;P&gt;region * season/ or dist=binary;&lt;/P&gt;&lt;P&gt;lsmeans region*season / slicediff=region oddsratio ilink cl pdiff;&lt;/P&gt;&lt;P&gt;lsmeans terres_acces*season / slicediff=terres_acces oddsratio cl pdiff;&lt;/P&gt;&lt;P&gt;format season saison.;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;This is what I got with proc Glimmix for the dependant variable with 2 categories: (I want to find results for my new dependent variable presents in a similar way!!)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 575px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19841iD85893D6B3934533/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>Mon, 16 Apr 2018 16:07:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454503#M114874</guid>
      <dc:creator>sebai</dc:creator>
      <dc:date>2018-04-16T16:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using contrast in proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454510#M114878</link>
      <description>&lt;P&gt;LSMEANS is very generic, it doesn't care if the dependent variable has 2 levels or 3 levels, it will work, why don't you try it?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 16:47:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-contrast-in-proc-logistic/m-p/454510#M114878</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-16T16:47:19Z</dc:date>
    </item>
  </channel>
</rss>

