<?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 statement with interaction terms in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-statement-with-interaction-terms/m-p/162322#M8448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your answer, I have not used the lsmestimate before, but my version indeed allows for it. I wanted to use the link=log to get the risk ratio instead of the odds ratio. It works perfectly and the results are very reasonable. I will use it more in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your response, it was very helpful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Krisztina Gurzo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Apr 2014 15:20:02 GMT</pubDate>
    <dc:creator>kgurzo</dc:creator>
    <dc:date>2014-04-01T15:20:02Z</dc:date>
    <item>
      <title>Estimate statement with interaction terms</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-statement-with-interaction-terms/m-p/162320#M8446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear Sas Support Group,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a model where I look at the accident risk of 3 different groups, including a dummy for group, the age category, gender, median income (standardized by subtracting the mean and dividing by two standard deviation) and an interaction between median income and the groups, since I believe that the effect of income on each group will be different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be able to interpret the effect, I used the statement estimate, however I am not totally sure if I gave the right formula, although I do get some results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have as code is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 12pt; font-family: Courier New;"&gt;genmod&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=data1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;desc&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; group gender age_cat;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; coll1=group age_cat gender st_medinc group*st_medinc / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;dist&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=binomial &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;link&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=log &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;type3&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 12pt; font-family: Courier New;"&gt;'group1 versus group3'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; group*st_medinc &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; -&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;exp&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 12pt; font-family: Courier New;"&gt;'group1 versus group2'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; group*st_medinc &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; -&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; /&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;exp&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 12pt; font-family: Courier New;"&gt;'group2 versus group3'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; group*st_medinc &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; -&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; /&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;exp&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;Could someone have a look and confirm if I did it correctly or if I need to correct the estimate statement somewhere?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;Thanks in advance for your help,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;Krisztina Gurzo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 23:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-statement-with-interaction-terms/m-p/162320#M8446</guid>
      <dc:creator>kgurzo</dc:creator>
      <dc:date>2014-03-31T23:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate statement with interaction terms</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-statement-with-interaction-terms/m-p/162321#M8447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know what version of SAS/STAT you are using, but if it is 12.1, try changing to the LSMESTIMATE statement.&amp;nbsp; Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lsmestimate group '1 v 3' 1 0 -1,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1 v 2' 1 -1 0,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2 v 3' 0 1 -1/exp at= &amp;lt;insert desired value for st_medinc&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This presupposes a significant group*st_medinc effect, so that the estimation should be done at a low value of st_medinc, the mean value of st_medinc, and a high value of st_medinc.&amp;nbsp; If the interaction is not significant, then comparison at the mean value will be as informative as at any other specific value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, be sure you want to use link=log, as the canonical link for the binomial distribution is the logit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 12:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-statement-with-interaction-terms/m-p/162321#M8447</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-04-01T12:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate statement with interaction terms</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-statement-with-interaction-terms/m-p/162322#M8448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your answer, I have not used the lsmestimate before, but my version indeed allows for it. I wanted to use the link=log to get the risk ratio instead of the odds ratio. It works perfectly and the results are very reasonable. I will use it more in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your response, it was very helpful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Krisztina Gurzo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 15:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-statement-with-interaction-terms/m-p/162322#M8448</guid>
      <dc:creator>kgurzo</dc:creator>
      <dc:date>2014-04-01T15:20:02Z</dc:date>
    </item>
  </channel>
</rss>

