<?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: Estimate or contrast statement with proc glimmix in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Estimate-or-contrast-statement-with-proc-glimmix/m-p/948227#M371046</link>
    <description>Your code looks good.&lt;BR /&gt;And I don't think the class statement would impact estimate statement.&lt;BR /&gt;class statement is used to form DESIGN matrix ,and could impact the LSMEAN,SLICE statement.</description>
    <pubDate>Sat, 19 Oct 2024 07:06:41 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-10-19T07:06:41Z</dc:date>
    <item>
      <title>Estimate or contrast statement with proc glimmix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Estimate-or-contrast-statement-with-proc-glimmix/m-p/948113#M371035</link>
      <description>&lt;P&gt;I have a fairly simple question. I am using proc glimmix to compare the odds of death (binary outcome) of across several different levels a categorical variable ( call it &lt;EM&gt;cat&lt;/EM&gt; with 4 levels 1, 2, 3, 4), adjusting for several clinical variables (&lt;EM&gt;var1-var4&lt;/EM&gt;) and clustering by &lt;EM&gt;hospital&lt;/EM&gt;. In the class statement, i can specify the reference level for&amp;nbsp;&lt;EM&gt;cat (&lt;/EM&gt;e.g., level 1) which will lead to estimates for 2 v 1, 3 v 1, and 4 v 1 which can be converted to odds ratios (the primary outcome we want to publish).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc glimmix data=model;&lt;/P&gt;&lt;P&gt;class hospital cat (ref=first);&lt;/P&gt;&lt;P&gt;model death (event='1') = cat var1 var2 var3 var4 /&amp;nbsp;dist=binary link=logit solution;&lt;BR /&gt;random intercept /subject=hospital; run;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, we are interested in a variety of comparisons (e.g. 3 v 2, 3 v 4, 1 v 3, etc.). Again, we ideally want exponentiated values (odds ratios) and we do not want to have to run the model multiple times with different reference levels. I think the estimate statement could get me where i want to go but I am having trouble coding it properly as I am not so sure of the order of the categories when i define a reference level or when i dont define a reference level.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would the following estimate statements generate the correct comparisons:&lt;/P&gt;&lt;P&gt;estimate '3 v 2' cat 0 -1 1 0/exp cl;&lt;/P&gt;&lt;P&gt;estimate '3 v 4' cat 0 0 1 -1/exp cl;&lt;/P&gt;&lt;P&gt;estimate '1 v 3' cat 1 0 -1 0/exp cl;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, when using estimate statements does defining a reference level in the class statement (i.e., class hospital cat (ref=first)) impact the estimate statements?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for thinking about what i hope is a simple question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 18:36:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Estimate-or-contrast-statement-with-proc-glimmix/m-p/948113#M371035</guid>
      <dc:creator>anujmehta</dc:creator>
      <dc:date>2024-10-18T18:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate or contrast statement with proc glimmix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Estimate-or-contrast-statement-with-proc-glimmix/m-p/948227#M371046</link>
      <description>Your code looks good.&lt;BR /&gt;And I don't think the class statement would impact estimate statement.&lt;BR /&gt;class statement is used to form DESIGN matrix ,and could impact the LSMEAN,SLICE statement.</description>
      <pubDate>Sat, 19 Oct 2024 07:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Estimate-or-contrast-statement-with-proc-glimmix/m-p/948227#M371046</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-19T07:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate or contrast statement with proc glimmix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Estimate-or-contrast-statement-with-proc-glimmix/m-p/948232#M371047</link>
      <description>&lt;P&gt;Don't use contrast or estimate in this case. You will get the proper comparisons from the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glimmix_syntax13.htm" target="_self"&gt;LSMEANS statement&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS has done the hard work of properly coding the contrast or estimate behind the scenes of the LSMEANS statement, so you don't have to struggle with it.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2024 09:43:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Estimate-or-contrast-statement-with-proc-glimmix/m-p/948232#M371047</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-10-19T09:43:36Z</dc:date>
    </item>
  </channel>
</rss>

