<?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: SAS &amp;quot;proc&amp;quot; for linear regression in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541290#M27143</link>
    <description>&lt;P&gt;A logistic model would more likely be more appropriate for your problem. Proc LOGISTIC would be the tool of choice. It supports continuous and nominal effects, without the need to create dummy variables (it creates them for you). A logistic model would estimate the probability that disease=1, as a function of the value of independent variables.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2019 05:17:25 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-03-08T05:17:25Z</dc:date>
    <item>
      <title>SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541279#M27140</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with variables' observations on different dates for 4000 unique hospitals (please see the sample dataset in code box). I want to run a&lt;STRONG&gt; linear regression model&lt;/STRONG&gt; with &lt;STRONG&gt;year and hospital fixed effects&lt;/STRONG&gt;. The model looks as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;model&amp;nbsp;disease = gender age weight distance temprature gender_job&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where "disease" "gender" and "gender_job" are &lt;STRONG&gt;dummy variables&lt;/STRONG&gt;, observation values are equal to&amp;nbsp; 1 when gender is Female, disease Exists and that gender has a job. And 0 otherwise. Also, age weight distance temprature gender_job are &lt;STRONG&gt;control variables&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Considering the fact that Y and some X variables are binary, "proc reg" may not give valid results. As mentioned, I need to apply &lt;STRONG&gt;two-way fixed effects&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly suggest which SAS proc I must use to run regression for this dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have ;
infile datalines
dlm=","
missover
DSD;
input hospital_ID : $5. date  : mmddyy10. disease gender age weight distance temprature gender_job ;
format date mmddyy10. ;
datalines ;
aa000,11/03/2005,0,0,25,70,1,27,.
aa000,01/25/2007,1,0,65,95,2,20,1
aa000,06/15/2007,1,0,48,100,.,40,0
aa000,09/11/2008,0,1,30,65,2.5,30,1
ab000,03/10/2010,1,1,40,75,1,15,1
ab000,12/30/2010,0,1,19,55,0.5,5,0
ac000,09/09/2004,0,0,17,60,1.5,.,0
ac000,09/09/2004,1,0,40,70,3,30,0
ac000,09/09/2004,1,1,29,69,2.2,30,1
ac000,05/03/2006,0,0,31,90,1,25,1
;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 02:01:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541279#M27140</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2019-03-08T02:01:57Z</dc:date>
    </item>
    <item>
      <title>SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541282#M27142</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with variables' observations on different dates for 4000 unique hospitals (please see the sample dataset in code box). I want to run a&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;linear regression model&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;year and hospital fixed effects&lt;/STRONG&gt;. The model looks as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;model&amp;nbsp; disease = gender age weight distance temperature gender_job&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where "disease" "gender" and "gender_job" are&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;dummy variables&lt;/STRONG&gt;, observation values are equal to&amp;nbsp; 1 when gender is Female, disease Exists and that gender has a job. And 0 otherwise. Also, age weight distance temperature gender_job are&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;control variables&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Considering the fact that Y and some X variables are binary, "proc reg" may not give valid results. As mentioned, I need to apply&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;two-way fixed effects&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly suggest which SAS proc I must use to run a regression for this dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have ;
infile datalines
dlm=","
missover
DSD;
input hospital_ID : $5. date  : mmddyy10. disease gender age weight distance temperature gender_job ;
format date mmddyy10. ;
datalines ;
aa000,11/03/2005,0,0,25,70,1,27,.
aa000,01/25/2007,1,0,65,95,2,20,1
aa000,06/15/2007,1,0,48,100,.,40,0
aa000,09/11/2008,0,1,30,65,2.5,30,1
ab000,03/10/2010,1,1,40,75,1,15,1
ab000,12/30/2010,0,1,19,55,0.5,5,0
ac000,09/09/2004,0,0,17,60,1.5,.,0
ac000,09/09/2004,1,0,40,70,3,30,0
ac000,09/09/2004,1,1,29,69,2.2,30,1
ac000,05/03/2006,0,0,31,90,1,25,1
;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Mar 2019 02:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541282#M27142</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2019-03-08T02:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541290#M27143</link>
      <description>&lt;P&gt;A logistic model would more likely be more appropriate for your problem. Proc LOGISTIC would be the tool of choice. It supports continuous and nominal effects, without the need to create dummy variables (it creates them for you). A logistic model would estimate the probability that disease=1, as a function of the value of independent variables.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 05:17:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541290#M27143</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-08T05:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541291#M27144</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;: Thanks for your suggestion. But in my case independent variable (i.e.gender) is a dummy too. Also, how does Proc logistic deal with two way fixed effects? I shall be thankful if you kindly share an appropriate code.</description>
      <pubDate>Fri, 08 Mar 2019 05:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541291#M27144</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2019-03-08T05:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541293#M27145</link>
      <description>&lt;P&gt;I had to merge your questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PLEASE DO NOT DOUBLE-POST!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 05:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541293#M27145</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-08T05:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541295#M27146</link>
      <description>&lt;P&gt;You need to know about logistic models before trying to fit them. Logistic models are usually covered in intermediate courses about statistical analysis.&lt;/P&gt;
&lt;P&gt;When you hear that a certain factor increases the risk of developping a disease by so many percents, they are generally referring to the result of a logistic model analysis.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 05:44:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541295#M27146</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-08T05:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541300#M27147</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;: Thanks. I shall be grateful if you kindly refer me to a relevant reading. As I am dealing with a financial dataset as well, where the dependent variable is a dummy. If trade takes place, the value is 1, and 0 otherwise. Therefore, I need to know the basic code as a starter. Thanks</description>
      <pubDate>Fri, 08 Mar 2019 06:08:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541300#M27147</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2019-03-08T06:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541352#M27150</link>
      <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Honestly, I don't understand your question very well.&lt;/P&gt;
&lt;P&gt;Maybe you need try PROC GEE or PROC GENMOD for GEE model .&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 10:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541352#M27150</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-03-08T10:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541353#M27151</link>
      <description>&lt;P&gt;A very similar question was posted by this user at&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Wald-test-for-proc-glm/m-p/541224#M27136" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/Wald-test-for-proc-glm/m-p/541224#M27136&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that the OP is confused about the relationship&amp;nbsp;between the CLASS statement and dummy variables. There is &lt;A href="http://support.sas.com/kb/23/137.html" target="_self"&gt;s SAS NOTE about CLASS variables&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 11:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541353#M27151</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-03-08T11:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS "proc" for linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541430#M27153</link>
      <description>&lt;P&gt;As mentioned, you probably need to fit a logistic GEE model. You can do this in PROC GEE with a REPEATED statement and the DIST=BINOMIAL option in the MODEL statement. In the SUBJECT= option of the REPEATED statement, you should specify a variable that has a distinct value for each set of correlated observation (possibly hospitals in your case). See &lt;A href="http://support.sas.com/kb/24200" target="_self"&gt;this note&lt;/A&gt; for details on the SUBJECT= effect.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 15:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-quot-proc-quot-for-linear-regression/m-p/541430#M27153</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-03-08T15:41:36Z</dc:date>
    </item>
  </channel>
</rss>

