<?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: How to write estimate for interactions in GENMOD in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-estimate-for-interactions-in-GENMOD/m-p/430570#M22628</link>
    <description>&lt;P&gt;So, found a solution with some help from another post..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-write-estimate-statements-for-continuous-by-continuous/m-p/195736#M10454" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-write-estimate-statements-for-continuous-by-continuous/m-p/195736#M10454&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=mydata;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class exposure (ref='C') / param=ref;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model countCT = exposure time exposure*time / dist=poisson link=log offset=logpersonyear;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'A&amp;nbsp;at time 1' &amp;nbsp;&amp;nbsp; int 1&amp;nbsp;&amp;nbsp; exposure 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time 1 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'C at time 1' &amp;nbsp;&amp;nbsp; int 1&amp;nbsp;&amp;nbsp; exposure&amp;nbsp;0 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Substract one from the other to get change in Y&amp;nbsp;for A vs C&amp;nbsp;*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'A&amp;nbsp;vs C at time 1'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time 1 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Same for B vs C */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'B vs C at time 1'&amp;nbsp; &amp;nbsp; exposure 0 1&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure*time 1 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* At time 60 */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'A vs C at time 60' &amp;nbsp;&amp;nbsp; exposure 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time 60 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'B vs C at time&amp;nbsp;60'&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure 0 1&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure*time 0 60&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is it!&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2018 18:27:32 GMT</pubDate>
    <dc:creator>chrisd9970</dc:creator>
    <dc:date>2018-01-24T18:27:32Z</dc:date>
    <item>
      <title>How to write estimate for interactions in GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-estimate-for-interactions-in-GENMOD/m-p/430476#M22625</link>
      <description>&lt;P&gt;Dear SAS Communities,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem writing the estimate for my interaction term for Poisson model. Here's a simple summary of my data:&lt;/P&gt;&lt;P&gt;Outcome: Number of CT scans per person year&lt;/P&gt;&lt;P&gt;Predictors: 1) Exposure categories: A, B, C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) Time (re-centered): 1, 2, 3, .... 60&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I test for interactions between exposure and time, they are significant (p &amp;lt; 0.001)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=mydata;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class exposure (ref='C') / param=ref;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model countCT = exposure time exposure*time / dist=poisson link=log offset=logpersonyear;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is writing the estimates because I need to report RR in my tables. With the time&amp;nbsp;interaction term, I need to report my RR at different time 1, 2, ...60. I read from other posts, I need to have all 3 predictors in my estimate statement....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=mydata;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class exposure (ref='C') / param=ref;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model countCT = exposure time exposure*time / dist=poisson link=log offset=logpersonyear;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'A vs C at time 1' &amp;nbsp;&amp;nbsp; exposure 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time [?]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time [?]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'B vs C at time 1'&amp;nbsp; &amp;nbsp; exposure 0 1&amp;nbsp;&amp;nbsp;&amp;nbsp; time [?]&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure*time [?]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [all other time in between....]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'A vs C at time 60' &amp;nbsp;&amp;nbsp; exposure 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time [?]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time [?]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'B vs C at time&amp;nbsp;60'&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure 0 1&amp;nbsp;&amp;nbsp;&amp;nbsp; time [?]&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure*time [?]&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure how to fill up the [?] in the estimate statement. How do we calculate [exposure*time]?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help if very much appreciated. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 15:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-estimate-for-interactions-in-GENMOD/m-p/430476#M22625</guid>
      <dc:creator>chrisd9970</dc:creator>
      <dc:date>2018-01-24T15:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write estimate for interactions in GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-estimate-for-interactions-in-GENMOD/m-p/430570#M22628</link>
      <description>&lt;P&gt;So, found a solution with some help from another post..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-write-estimate-statements-for-continuous-by-continuous/m-p/195736#M10454" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-write-estimate-statements-for-continuous-by-continuous/m-p/195736#M10454&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=mydata;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class exposure (ref='C') / param=ref;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model countCT = exposure time exposure*time / dist=poisson link=log offset=logpersonyear;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'A&amp;nbsp;at time 1' &amp;nbsp;&amp;nbsp; int 1&amp;nbsp;&amp;nbsp; exposure 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time 1 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'C at time 1' &amp;nbsp;&amp;nbsp; int 1&amp;nbsp;&amp;nbsp; exposure&amp;nbsp;0 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Substract one from the other to get change in Y&amp;nbsp;for A vs C&amp;nbsp;*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'A&amp;nbsp;vs C at time 1'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time 1 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Same for B vs C */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'B vs C at time 1'&amp;nbsp; &amp;nbsp; exposure 0 1&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure*time 1 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* At time 60 */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'A vs C at time 60' &amp;nbsp;&amp;nbsp; exposure 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exposure*time 60 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate 'B vs C at time&amp;nbsp;60'&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure 0 1&amp;nbsp;&amp;nbsp;&amp;nbsp; time&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp; exposure*time 0 60&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is it!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 18:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-estimate-for-interactions-in-GENMOD/m-p/430570#M22628</guid>
      <dc:creator>chrisd9970</dc:creator>
      <dc:date>2018-01-24T18:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to write estimate for interactions in GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-estimate-for-interactions-in-GENMOD/m-p/430587#M22629</link>
      <description>&lt;P&gt;It is always best to avoid using ESTIMATE or CONTRAST statements to make simple comparisons when possible. Instead, use the LSMEANS or SLICE statements which do not require you to determine the proper linear combination of model parameters - a very error-prone task. In this model with interaction, the SLICE statement is what you need to make EXPOSURE comparisons at each time. There are several examples in &lt;A href="http://support.sas.com/kb/24447" target="_self"&gt;this note&lt;/A&gt; which shows using both the SLICE and CONTRAST or ESTIMATE statements but strongly encourages the use of SLICE or LSMEANS. You will also want to use the EXP option in SLICE so that the differences are exponentiated to be rate ratios.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See also &lt;A href="http://support.sas.com/kb/24188" target="_self"&gt;this note&lt;/A&gt; on estimating rates and rate ratios.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 18:48:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-estimate-for-interactions-in-GENMOD/m-p/430587#M22629</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-01-24T18:48:22Z</dc:date>
    </item>
  </channel>
</rss>

