<?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: Adding Interaction Terms in SAS Proc Panel in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-Interaction-Terms-in-SAS-Proc-Panel/m-p/684588#M32963</link>
    <description>&lt;P&gt;What happens when you remove the CLASS statement but leave in interactions with the dummy variables?&amp;nbsp; I am going to guess that the solution vector values are identical to what you have.&amp;nbsp; The advantage of the CLASS statement over dummy variables in a regression is that interactions (especially three way and higher, or for variables with multiple levels) are much easier to introduce.&amp;nbsp; In fact, there is an entire procedure devoted to creating dummy variables for models with CLASS variables of this sort (GLMMOD).&amp;nbsp; Plug in the design variables in the CLASS statement, and get out all of the dummies corresponding to those.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Thu, 17 Sep 2020 13:10:39 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-09-17T13:10:39Z</dc:date>
    <item>
      <title>Adding Interaction Terms in SAS Proc Panel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-Interaction-Terms-in-SAS-Proc-Panel/m-p/684475#M32961</link>
      <description>&lt;P&gt;I want to add interaction terms in SAS Proc Panel. I checked some online materials and heard that I need to use the Class Statment.&lt;/P&gt;&lt;P&gt;So here below is my code:&lt;/P&gt;&lt;PRE&gt;proc panel data=rrd_come.city_ln_combo_8;
id City TimeID;
class event_level1 event_level2;
model LoanNum = StructureBreak event_level1 event_level2 GDP_per_capita HHI event_level1*GDP_per_capita event_level2*GDP_per_capita
event_level1*HHI event_level2*HHI/ fixone printfixed;
run;&lt;/PRE&gt;&lt;P&gt;And the result looks like below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="applemonster_0-1600308775350.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49477iED39DBC9A0E7DC6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="applemonster_0-1600308775350.png" alt="applemonster_0-1600308775350.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It makes sense, but it looks ugly. I want to ask whether it is the optimal strategy to include interaction terms. Do we have to treat dummy variables as categorical variables? I mean SAS may treat the values of a categorical variable as text, which may explain the way it output the results. But a dummy variable has two numerical values, 0 and 1, so I think it is a waste to use a categorical-variable format to represent a dummy variable. Is there a better way to write the code? Thanks for your valuable suggestions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 02:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-Interaction-Terms-in-SAS-Proc-Panel/m-p/684475#M32961</guid>
      <dc:creator>applemonster</dc:creator>
      <dc:date>2020-09-17T02:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Interaction Terms in SAS Proc Panel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-Interaction-Terms-in-SAS-Proc-Panel/m-p/684588#M32963</link>
      <description>&lt;P&gt;What happens when you remove the CLASS statement but leave in interactions with the dummy variables?&amp;nbsp; I am going to guess that the solution vector values are identical to what you have.&amp;nbsp; The advantage of the CLASS statement over dummy variables in a regression is that interactions (especially three way and higher, or for variables with multiple levels) are much easier to introduce.&amp;nbsp; In fact, there is an entire procedure devoted to creating dummy variables for models with CLASS variables of this sort (GLMMOD).&amp;nbsp; Plug in the design variables in the CLASS statement, and get out all of the dummies corresponding to those.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 13:10:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-Interaction-Terms-in-SAS-Proc-Panel/m-p/684588#M32963</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-17T13:10:39Z</dc:date>
    </item>
  </channel>
</rss>

