<?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: PROC GLM Interaction Confusion in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206732#M51373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interactions between continuous variables can be created as simple products (XY = X*Y;). Interactions between CLASS variables should not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2015 02:42:15 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2015-04-30T02:42:15Z</dc:date>
    <item>
      <title>PROC GLM Interaction Confusion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206729#M51370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two 2-level independent variables: Gender (0 and 1) and Group (0 and 1) and a continuous DV: Score.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my full model, I ran the following analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;PROC GLM DATA = mydata;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLASS Gender Group;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MODEL Score = Gender Group Gender*Group&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just out of interest, I calculate an interaction between the two variables myself (by using this formula: "Interaction = Gender*Group") and ran this model:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;PROC GLM DATA = mydata;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLASS Gender Group Interaction; *It makes no difference if "Interaction" is in the class section;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MODEL Score = Gender Group Interaction;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The weird thing is that these produced different results! The results for the interaction were the same in each, but the individual main effects were very different. The reason that I am interested in this is that with PROC REG, the latter kind of model is the only possible one. And indeed, the results from PROC REG match the results from the second model above, and not the first (more automatic) one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What gives? Am I calculating the interaction incorrectly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fearghal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 23:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206729#M51370</guid>
      <dc:creator>obrienfk</dc:creator>
      <dc:date>2015-04-29T23:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLM Interaction Confusion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206730#M51371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The asterisk in the interaction syntax doesn't really mean the product of the variable values. It implies the combinations of the class variable levels and generates multiple dummy variables in the design matrix. In your calculation of &lt;STRONG&gt;interaction&lt;/STRONG&gt;, the terms (Gender; Group) = (0;0), (0;1) and (1;0) all correspond to interaction=0. To get the proper dummy variables in your design matrix, use &lt;STRONG&gt;proc glmmod&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;PROC GLMMOD DATA = myData outParm=parms outDesign=myDesign;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLASS Gender Group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MODEL Score = Gender Group Gender*Group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Check out the &lt;STRONG&gt;parms&lt;/STRONG&gt; and &lt;STRONG&gt;myDesign&lt;/STRONG&gt; datasets. You can then use the &lt;STRONG&gt;myDesign&lt;/STRONG&gt; dataset with &lt;STRONG&gt;proc reg,&lt;/STRONG&gt; if you wish.&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 02:22:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206730#M51371</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-04-30T02:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLM Interaction Confusion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206731#M51372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for that really clear response PG. Given that the asterisk in the GLM syntax doesn't literally mean the product of, does this mean that in general, one should &lt;STRONG&gt;not&lt;/STRONG&gt; create an interaction in a regression model through such a simple product manner? - I feel like people do this all the time Or is my situation just a special case where the product and the asterisk syntax in GLM give different results?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 02:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206731#M51372</guid>
      <dc:creator>obrienfk</dc:creator>
      <dc:date>2015-04-30T02:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLM Interaction Confusion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206732#M51373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interactions between continuous variables can be created as simple products (XY = X*Y;). Interactions between CLASS variables should not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 02:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206732#M51373</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-04-30T02:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLM Interaction Confusion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206733#M51374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's really interesting and good to note. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 02:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206733#M51374</guid>
      <dc:creator>obrienfk</dc:creator>
      <dc:date>2015-04-30T02:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLM Interaction Confusion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206734#M51375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the documentation for GLM parameterization at &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_glm_sect030.htm" title="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_glm_sect030.htm"&gt;SAS/STAT(R) 9.3 User's Guide&amp;nbsp; &lt;/A&gt;&lt;/P&gt;&lt;P&gt;for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 14:19:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GLM-Interaction-Confusion/m-p/206734#M51375</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-04-30T14:19:32Z</dc:date>
    </item>
  </channel>
</rss>

