<?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: Suitable &amp;quot;proc&amp;quot; for a model with Dummy dependent and independent variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/545564#M27288</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;Thank you so much. I am using proc logistic for the mentioned models. I am a bit confused regarding the difference between strata and class statements. My purpose is to include time and firm fixed effects in the models i.e. creating dummies for each one of them and considering last category as reference. Class statement does the trick, i.e. putting both "Month" and "PERMNO" in class statement. I expect the same results when using PERMNO in Strata statement and Month in Class Statement, however, the results are different. Using PERMNO in Class statement is taking around 2 - 2.30 hours in creating output tables.&lt;/P&gt;&lt;P&gt;Need your suggestion in this regard. Thanks&lt;/P&gt;</description>
    <pubDate>Sun, 24 Mar 2019 03:48:27 GMT</pubDate>
    <dc:creator>Saba1</dc:creator>
    <dc:date>2019-03-24T03:48:27Z</dc:date>
    <item>
      <title>Suitable "proc" for a model with Dummy dependent and independent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/541784#M27167</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;have below mentioned two models. In Model-1 dependent (Buy) and independent (Gender) variables are categorical variables. Rest of the&amp;nbsp;control variables are continuous. Whereas, in Model-2 all the dependent and independent variables (i.e. interaction terms of gender and types of executives) are&amp;nbsp;dummy variables. Also, I need to include &lt;STRONG&gt;two-way fixed effect&lt;/STRONG&gt; in my regression models i.e. &lt;STRONG&gt;time and firm fixed effect&lt;/STRONG&gt;. My data has 12 months and 4000 unique firms.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure &lt;EM&gt;&lt;STRONG&gt;which "proc" to use for these two models&lt;/STRONG&gt;&lt;/EM&gt; to get accurate estimates. Just to mention, for Model-2, I need to measure&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;a significant difference&lt;/I&gt;&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;between the coefficients&lt;/STRONG&gt;&lt;/EM&gt; of male and female in 3 different executive positions.&amp;nbsp;For example, difference between coefficients of Female_Chairman and Male_Chairman.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Model - 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Buy=&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;α&lt;/STRONG&gt;+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β&lt;/STRONG&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;Gender+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β2&lt;/STRONG&gt;Age+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β3&lt;/STRONG&gt;Experience+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β4&lt;/STRONG&gt;Return+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β5&lt;/STRONG&gt;Firm_Size+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β6&lt;/STRONG&gt;Volatility+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β7&lt;/STRONG&gt;shares+ ∑&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β&lt;/STRONG&gt;month+ ∑&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β&lt;/STRONG&gt;firm+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ε&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Model - 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Buy=&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;α&lt;/STRONG&gt;+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β&lt;/STRONG&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;Female_Chairman +&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β2&lt;/STRONG&gt;Male_Chairman +&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β3&lt;/STRONG&gt;Female_Director +&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β4&lt;/STRONG&gt;Male_Director +&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β5&lt;/STRONG&gt;Female_Officer +&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β6&lt;/STRONG&gt;Male_Officer+ ∑&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β&lt;/STRONG&gt;month+ ∑&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;β&lt;/STRONG&gt;firm+&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ε&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Buy (dependent)&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= dummy variable equals “1” when shares are bought, and “0” if shares are sold.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Gender (independent)&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= dummy variable equals “1” if executive is a female, and “0” if male.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously I used proc glm, but then realized that due to a binary dependent variable&amp;nbsp;the coefficients&amp;nbsp;would be misleading.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data= Model_1;
absorb firm;
 class month;
	model Buy = Gender Age Experience Return Firm_Size Volatility shares month / solution noint;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Kindly suggest an appropriate syntax for the solution. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 10:10:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/541784#M27167</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2019-03-11T10:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable "proc" for a model with Dummy dependent and independent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/542023#M27170</link>
      <description>&lt;P&gt;As I discussed in one of your other postings on this same question (would be better to not create multiple postings), GLM is NOT appropriate for a binary response since it assumes the response is normal and a binary response is about as far from normal as you can get. I suggested using either PROC GEE with a REPEATED statement or PROC LOGISTIC with a STRATA statement. See the examples of both of these in the documentation for those procedures. These are two approaches for modeling data with repeated measurements where you have clusters of correlated observations. If you consider all of the observations within a firm as correlated, then you would specify your firm variable in the SUBJECT= option in GEE's REPEATED statement or in LOGISTIC's STRATA statement. Again, as I mentioned before, the model you say you want would include Gender and Position type variables (NOT dummy variables for their individual levels) and their interaction. These two variables should appear in both the CLASS and MODEL statements in either procedure and then the SLICE statement can be used to do the comparisons. I gave an example of this using PROC LOGISTIC.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 14:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/542023#M27170</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-03-11T14:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable "proc" for a model with Dummy dependent and independent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/542214#M27174</link>
      <description>&lt;P&gt;Elsewhere I recall that you (&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/166516"&gt;@Saba1&lt;/a&gt;)&amp;nbsp;say there are 4000+ firms. I'm guessing that will be too many for most procedures (might work in HPMIXED; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;might know). And regardless, I wonder how you would interpret the effect of a fixed effects factor with over 4000 levels.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it be better to think of firm (PERMNO, elsewhere) as a random effects factor, where the 4000 firms in your dataset represent a random sample of all possible firms that you would want to make inference to? This would be a shift in how you envision your study and the questions it is meant to address.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;that you should use a procedure that is appropriate for a binary response, and that you should incorporate your categorical predictor variables in a form that can be use in the CLASS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other aspects of your study suggest that observations are not independent and consequently a mixed model may be necessary. A mixed model with a binary response is complicated;&amp;nbsp;&lt;A href="https://support.sas.com/content/dam/SAS/support/en/books/sas-for-mixed-models-an-introduction/68787_excerpt.pdf" target="_self"&gt;SAS® for Mixed Models: Introduction and Basic Applications&lt;/A&gt;&amp;nbsp;is an excellent resource.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 21:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/542214#M27174</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2019-03-11T21:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable "proc" for a model with Dummy dependent and independent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/545563#M27287</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708"&gt;@sld&lt;/a&gt;&amp;nbsp;Thanks for your thoughtful reply. I am using "proc logistic" and&amp;nbsp; need to consider time and firm fixed effect i.e. creating dummy variables for each one of them and then taking last category as a reference. You are right, when I use PERMNO in class statement, the code keeps running for around two hours and then creates output tables. Else all is fine but Timings is the main concern here.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2019 03:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/545563#M27287</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2019-03-24T03:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable "proc" for a model with Dummy dependent and independent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/545564#M27288</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;Thank you so much. I am using proc logistic for the mentioned models. I am a bit confused regarding the difference between strata and class statements. My purpose is to include time and firm fixed effects in the models i.e. creating dummies for each one of them and considering last category as reference. Class statement does the trick, i.e. putting both "Month" and "PERMNO" in class statement. I expect the same results when using PERMNO in Strata statement and Month in Class Statement, however, the results are different. Using PERMNO in Class statement is taking around 2 - 2.30 hours in creating output tables.&lt;/P&gt;&lt;P&gt;Need your suggestion in this regard. Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2019 03:48:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/545564#M27288</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2019-03-24T03:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable "proc" for a model with Dummy dependent and independent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/545789#M27294</link>
      <description>&lt;P&gt;The CLASS statement simply creates coded design (or "dummy") variables for the specified variables to represent them in the model. It does not fundamentally effect the method of analysis. The STRATA statement does not create design variables. Instead, it specifies the variable(s) which define groups of correlated observations and then instructs PROC LOGISTIC to estimate the model using conditional maximum likelihood estimation. This is the so-called fixed effects logistic model and has the effect of estimating the other parameters in the model while conditioning out the parameters that indicate the groups of correlated observations. With or without the STRATA statement, you can use the STRATA statement to indicate the categorical predictors in your model. But the analyses with vs without the STRATA statement are entirely different as is obvious since the group parameters are not estimated in the conditional model. The fixed effects model is discussed and illustrated in detail in the book "Fixed Effects Regression Methods for Longitudinal Data Using SAS"&amp;nbsp; (Allison, P., SAS Institute, 2005).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 13:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/545789#M27294</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-03-25T13:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Suitable "proc" for a model with Dummy dependent and independent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/546008#M27299</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;: Thank you so much for this detailed explanation. I am very clear now about the workings of class and strata statements. Thanks again.</description>
      <pubDate>Tue, 26 Mar 2019 01:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suitable-quot-proc-quot-for-a-model-with-Dummy-dependent-and/m-p/546008#M27299</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2019-03-26T01:59:11Z</dc:date>
    </item>
  </channel>
</rss>

