<?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: Question for estimate and contrast statement in proc genmod in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Question-for-estimate-and-contrast-statement-in-proc-genmod/m-p/881149#M43602</link>
    <description>&lt;P&gt;You should always avoid using the CONTRAST or ESTIMATE statement when simpler statements like LSMEANS, LSMESTIMATE, or SLICE can be used. In this case, you can drop the ESTIMATE statements and replace them with a single LSMEANS statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lsmeans age1 / diff cl exp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Exponentiated columns in the LSMEANS table are the estimated event probabilities and in the Differences table they give the relative risk estimates.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Jun 2023 16:35:51 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2023-06-16T16:35:51Z</dc:date>
    <item>
      <title>Question for estimate and contrast statement in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Question-for-estimate-and-contrast-statement-in-proc-genmod/m-p/881145#M43601</link>
      <description>&lt;P&gt;Hi, I'm trying to calculate relative risk (RR) for a cohort study using proc genmod. I'm confused about the difference between the estimate and contrast statement and what the 1 / 0 wrote after the variable in the estimate/contrast statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my class level of the independent variable (I set 'age1=2' as the reference and I want to calculate the RR of other age1 groups vs 'age1=2', respectively):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-06-16 120539.png" style="width: 304px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85063iE6CA05F7F2AE6A8C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-06-16 120539.png" alt="Screenshot 2023-06-16 120539.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and this is the code I use now (I reviewed some instructions but I don't really understand the meaning of the numbers like '1 0 0 0', and '0 0 1 0' after age1 in the estimate row, like what they represent? how do we know what number I should put in here?" :&lt;/P&gt;&lt;PRE&gt;proc genmod data=liverf desc;
class age1 (ref='2') / param=ref;
model caseco(ref='0') = age1 / dist=bin link=log;
estimate "Age1 vs Age2" age1 1 0 0 0 /exp;
estimate "Age3 vs Age2" age1 0 1 0 0 / exp;
estimate "Age4 vs Age2" age1 0 0 1 0 / exp;
estimate "Age5 vs Age2" age1 0 0 0 1 / exp;
run;&lt;/PRE&gt;&lt;P&gt;This is the output of the codes (Is the mean estimate the calculated relative risk, and the mean CI is the CI corresponding to the RR?)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85064iFE39BFECC4CC4B54/image-size/large?v=v2&amp;amp;px=999" role="button" title="12.png" alt="12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If anyone can explain and clarify these, I would really appreciate it.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 16:24:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Question-for-estimate-and-contrast-statement-in-proc-genmod/m-p/881145#M43601</guid>
      <dc:creator>LarissaW</dc:creator>
      <dc:date>2023-06-16T16:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Question for estimate and contrast statement in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Question-for-estimate-and-contrast-statement-in-proc-genmod/m-p/881149#M43602</link>
      <description>&lt;P&gt;You should always avoid using the CONTRAST or ESTIMATE statement when simpler statements like LSMEANS, LSMESTIMATE, or SLICE can be used. In this case, you can drop the ESTIMATE statements and replace them with a single LSMEANS statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lsmeans age1 / diff cl exp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Exponentiated columns in the LSMEANS table are the estimated event probabilities and in the Differences table they give the relative risk estimates.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 16:35:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Question-for-estimate-and-contrast-statement-in-proc-genmod/m-p/881149#M43602</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-06-16T16:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Question for estimate and contrast statement in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Question-for-estimate-and-contrast-statement-in-proc-genmod/m-p/881247#M43603</link>
      <description>StatDave is right.&lt;BR /&gt;Check:&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/23/003.html" target="_blank"&gt;https://support.sas.com/kb/23/003.html&lt;/A&gt;</description>
      <pubDate>Sat, 17 Jun 2023 09:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Question-for-estimate-and-contrast-statement-in-proc-genmod/m-p/881247#M43603</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-06-17T09:42:50Z</dc:date>
    </item>
  </channel>
</rss>

