<?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: Fixed effects regression in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154551#M40604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the code will &lt;EM&gt;work&lt;/EM&gt;, but it's not optimal with categorical variables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So after reading all of the post, this isn't really a regression, as you can't regress on categories (unless you make some assumptions about equal spacing and so forth).&amp;nbsp; It's a simple multi-factor analysis of variance, with no interactions.&amp;nbsp; Your GLM code is ideal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always put the quit; before the run; for interactive PROCs (GLM, REG, SQL).&amp;nbsp; Maybe I've had it wrong all this time.&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>Thu, 30 Jan 2014 20:41:06 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2014-01-30T20:41:06Z</dc:date>
    <item>
      <title>Fixed effects regression</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154546#M40599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to run a fixed effects linear regression with effects at the participant level. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Var1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Var2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Var3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Var4&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 37&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 42&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where ID is a unique identifier for each participant, Var1-Var3 are categorical, and Var4 is continuous&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to check the effects of all variables (including the ID variable), on Var4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 14:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154546#M40599</guid>
      <dc:creator>Walternate</dc:creator>
      <dc:date>2014-01-28T14:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed effects regression</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154547#M40600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can check the effects of the ID Variable against Var 4. Doesn't make sense given the data you have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards to the rest of the variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC GLM DATA=whatever;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLASS VAR1-VAR3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MODEL VAR4=VAR1-VAR3;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps an even better idea is to use PROC PLS instead of PROC GLM, which isn't exactly a linear regression, but it might be a model that fits and predicts better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an additional suggestion ... which maybe you have not provided because this is such a simple example, I would give meaningful names to VAR1 through VAR4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 17:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154547#M40600</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-01-28T17:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed effects regression</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154548#M40601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you expect ID to interact with the response variable?&amp;nbsp; Does it index enrollment in the study or something of that nature?&amp;nbsp; Ordinarily, I would consider ID as a random effect, which in this context is the source of residual error.&amp;nbsp; Thus, the regression would look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc reg data=yourdata;&lt;/P&gt;&lt;P&gt;model var4=var1-var3;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this you can explore collinearity, influential observations and other problems related to regression.&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>Thu, 30 Jan 2014 14:03:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154548#M40601</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-01-30T14:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed effects regression</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154549#M40602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To estimate a fixed effects model with (fixed) effects at the participant level, you will need to have more than one observation per person - which you don't seem to have.&amp;nbsp; Think of it as adding in a dummy variable for each person (though the software does this for you automatically). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 15:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154549#M40602</guid>
      <dc:creator>BruceBrad</dc:creator>
      <dc:date>2014-01-30T15:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed effects regression</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154550#M40603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;SteveDenham wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;How do you expect ID to interact with the response variable?&amp;nbsp; Does it index enrollment in the study or something of that nature?&amp;nbsp; Ordinarily, I would consider ID as a random effect, which in this context is the source of residual error.&amp;nbsp; Thus, the regression would look like:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;proc reg data=yourdata;&lt;/P&gt;
&lt;P&gt;model var4=var1-var3;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;Does this really work if var1 to var3 are categorical, as stated in the original post?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shouldn't the run; go before the quit;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 20:32:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154550#M40603</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-01-30T20:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed effects regression</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154551#M40604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the code will &lt;EM&gt;work&lt;/EM&gt;, but it's not optimal with categorical variables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So after reading all of the post, this isn't really a regression, as you can't regress on categories (unless you make some assumptions about equal spacing and so forth).&amp;nbsp; It's a simple multi-factor analysis of variance, with no interactions.&amp;nbsp; Your GLM code is ideal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always put the quit; before the run; for interactive PROCs (GLM, REG, SQL).&amp;nbsp; Maybe I've had it wrong all this time.&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>Thu, 30 Jan 2014 20:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154551#M40604</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-01-30T20:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed effects regression</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154552#M40605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I have to admit that the original post stated that this was about linear regression, and that threw me off for a few minutes, as this really isn't linear regression without a single continuous variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm pretty sure run; goes before quit;, that's always how I've done it, but I was asking because maybe you had a good reason to do so — but run; is completely useless in PROC SQL, waste of type typing those 4 characters in PROC SQL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 21:07:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154552#M40605</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-01-30T21:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed effects regression</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154553#M40606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A lot of times I just type, and run; gets stuck in there when I know I have reached a "border" in what I'm doing.&amp;nbsp; Old habits die hard.&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>Fri, 31 Jan 2014 13:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Fixed-effects-regression/m-p/154553#M40606</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-01-31T13:57:44Z</dc:date>
    </item>
  </channel>
</rss>

