<?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 sas regression fixed effect (by industry and year) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-regression-fixed-effect-by-industry-and-year/m-p/626483#M184800</link>
    <description>&lt;P&gt;I'm new to SAS. I'm doing research for stock market, and I want to run a regression with fixed effect by industry and year at the same time(i.e: if there are four industry and ten years, I want to generate forty regression results for each industry in each year)&lt;/P&gt;&lt;P&gt;I run the code as following, which the result isn't what I want obviously.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/////&lt;/P&gt;&lt;P&gt;proc glm data=dac;&lt;BR /&gt;class industry year;&lt;BR /&gt;model y = x1 x2 x3 industry year / solution;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;/////&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to solve my problem?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2020 15:25:05 GMT</pubDate>
    <dc:creator>spasico</dc:creator>
    <dc:date>2020-02-21T15:25:05Z</dc:date>
    <item>
      <title>sas regression fixed effect (by industry and year)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-regression-fixed-effect-by-industry-and-year/m-p/626483#M184800</link>
      <description>&lt;P&gt;I'm new to SAS. I'm doing research for stock market, and I want to run a regression with fixed effect by industry and year at the same time(i.e: if there are four industry and ten years, I want to generate forty regression results for each industry in each year)&lt;/P&gt;&lt;P&gt;I run the code as following, which the result isn't what I want obviously.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/////&lt;/P&gt;&lt;P&gt;proc glm data=dac;&lt;BR /&gt;class industry year;&lt;BR /&gt;model y = x1 x2 x3 industry year / solution;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;/////&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to solve my problem?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-regression-fixed-effect-by-industry-and-year/m-p/626483#M184800</guid>
      <dc:creator>spasico</dc:creator>
      <dc:date>2020-02-21T15:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: sas regression fixed effect (by industry and year)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-regression-fixed-effect-by-industry-and-year/m-p/626488#M184805</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I run the code as following, which the result isn't what I want obviously.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Since Industry and Year are class variables, you do get different intercepts for each industry/year combination, but the slopes of X1 X2 and X3 are constant. If you want different slopes for each industry/year combination:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model y = x1*industry*year x2*industry*year x3*industry*year/ solution;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;That's one way to get the slopes for each industry/year combination, there are other MODEL statements that do the equivalent but are parameterized differently.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-regression-fixed-effect-by-industry-and-year/m-p/626488#M184805</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-21T15:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: sas regression fixed effect (by industry and year)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-regression-fixed-effect-by-industry-and-year/m-p/626499#M184808</link>
      <description>now I feel like I'm stupid....&lt;BR /&gt;This does help! thanks a lot to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;</description>
      <pubDate>Fri, 21 Feb 2020 16:14:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-regression-fixed-effect-by-industry-and-year/m-p/626499#M184808</guid>
      <dc:creator>spasico</dc:creator>
      <dc:date>2020-02-21T16:14:28Z</dc:date>
    </item>
  </channel>
</rss>

