<?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 Contrast statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Contrast-statement/m-p/725004#M225125</link>
    <description>&lt;P&gt;Can anyone help me figure out how i can write a contrast statement for a 3 variable model....each model having only 2 levels (coded 0,1) in SAS. I can't find anywhere that explains this concept well. I am trying to work off this example, but it used a 2 variable model and each variable with 3 levels. Please i need help.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data = logit_sim desc;
class x1 (ref = '1') x2 (ref = '1') / param=ref;
model y = x1 x2;
contrast 'x1 = 1 x2 1 v 2' x2 1    /e estimate = parm;
contrast 'x1 = 1 x2 1 v 3' x2 0 1  /e estimate = parm;
contrast 'x1 = 1 x2 2 v 3' x2 1 -1 /e estimate = parm;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 09 Mar 2021 22:49:51 GMT</pubDate>
    <dc:creator>ChuksManuel</dc:creator>
    <dc:date>2021-03-09T22:49:51Z</dc:date>
    <item>
      <title>Contrast statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contrast-statement/m-p/725004#M225125</link>
      <description>&lt;P&gt;Can anyone help me figure out how i can write a contrast statement for a 3 variable model....each model having only 2 levels (coded 0,1) in SAS. I can't find anywhere that explains this concept well. I am trying to work off this example, but it used a 2 variable model and each variable with 3 levels. Please i need help.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data = logit_sim desc;
class x1 (ref = '1') x2 (ref = '1') / param=ref;
model y = x1 x2;
contrast 'x1 = 1 x2 1 v 2' x2 1    /e estimate = parm;
contrast 'x1 = 1 x2 1 v 3' x2 0 1  /e estimate = parm;
contrast 'x1 = 1 x2 2 v 3' x2 1 -1 /e estimate = parm;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Mar 2021 22:49:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contrast-statement/m-p/725004#M225125</guid>
      <dc:creator>ChuksManuel</dc:creator>
      <dc:date>2021-03-09T22:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Contrast statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contrast-statement/m-p/725108#M225185</link>
      <description>&lt;P&gt;Contrasts are generally not needed to compare one level to another. Instead, you can use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax20.htm&amp;amp;locale=en" target="_self"&gt;LSMEANS statement&lt;/A&gt; which has any number of options available to do statistical testing.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Contrasts are generally needed when you want to compare more complicated relationships than "is one level different than another level", for example, if you wanted to evaluate if 3*(mean of level 1)–2*(mean of level 2)–0.5*(mean of level 3).&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 11:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contrast-statement/m-p/725108#M225185</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-03-10T11:47:28Z</dc:date>
    </item>
  </channel>
</rss>

