<?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 CONTRAST STATEMENTS in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-LOGISTIC-CONTRAST-STATEMENTS/m-p/547020#M27341</link>
    <description>&lt;P&gt;It's always best to avoid the CONTRAST and ESTIMATE statements when other statements that don't require specifying contrast coefficients can do what you want. In this case, you probably just need a single LSMEANS statement. Note the change of PARAM= to GLM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PROC LOGISTIC DATA=origs descending;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CLASS&amp;nbsp; quint(ref="2")/param=glm;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model event= quint;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;lsmeans quint / diff oddsratio;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2019 20:20:59 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2019-03-28T20:20:59Z</dc:date>
    <item>
      <title>PROC LOGISTIC CONTRAST STATEMENTS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-LOGISTIC-CONTRAST-STATEMENTS/m-p/546963#M27336</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I'm trying to write some contrast statements in proc logistic.&amp;nbsp; The dependent variable is event (0,1) and the independent variable is quintile, which has 5 categories (0, 1, 2, 3, 4). I want the value of 2 to be the reference, but also want to compare other quintiles.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC LOGISTIC DATA=origs descending;&lt;BR /&gt;CLASS&amp;nbsp; quint(ref="2")/param=ref;&lt;BR /&gt;model event= quint;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;contrast '0vs2' quint&amp;nbsp; 1&amp;nbsp; 0&amp;nbsp; 0&amp;nbsp; 0&amp;nbsp; -1 /estimate=both;&lt;BR /&gt;contrast '1vs2' quint&amp;nbsp; 0&amp;nbsp; 1&amp;nbsp; 0&amp;nbsp; 0&amp;nbsp; -1 /estimate=both;&lt;BR /&gt;contrast '3vs2' quint&amp;nbsp; 0&amp;nbsp; 0&amp;nbsp; 1&amp;nbsp; 0&amp;nbsp; -1 /estimate=both;&lt;BR /&gt;contrast '4vs2' quint&amp;nbsp; 0&amp;nbsp; 0&amp;nbsp; 0&amp;nbsp; 1&amp;nbsp; -1 /estimate=both;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found that the contrast statements above yield the same results as the model output (with 2 as the reference), but I can not figure out how to write contrast statements to compare, say quintile 3 vs 4. Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 17:20:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-LOGISTIC-CONTRAST-STATEMENTS/m-p/546963#M27336</guid>
      <dc:creator>tka726</dc:creator>
      <dc:date>2019-03-28T17:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC LOGISTIC CONTRAST STATEMENTS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-LOGISTIC-CONTRAST-STATEMENTS/m-p/547020#M27341</link>
      <description>&lt;P&gt;It's always best to avoid the CONTRAST and ESTIMATE statements when other statements that don't require specifying contrast coefficients can do what you want. In this case, you probably just need a single LSMEANS statement. Note the change of PARAM= to GLM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PROC LOGISTIC DATA=origs descending;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CLASS&amp;nbsp; quint(ref="2")/param=glm;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model event= quint;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;lsmeans quint / diff oddsratio;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 20:20:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-LOGISTIC-CONTRAST-STATEMENTS/m-p/547020#M27341</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-03-28T20:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC LOGISTIC CONTRAST STATEMENTS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-LOGISTIC-CONTRAST-STATEMENTS/m-p/547040#M27342</link>
      <description>&lt;P&gt;This is perfect, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 21:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-LOGISTIC-CONTRAST-STATEMENTS/m-p/547040#M27342</guid>
      <dc:creator>tka726</dc:creator>
      <dc:date>2019-03-28T21:31:39Z</dc:date>
    </item>
  </channel>
</rss>

