<?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: Count regression code in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160358#M41770</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you expect anyone posting actual code without you providing sample data (a data step creating such data) and a description of how the result should look like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also: What are your thoughts about how this could be done? Have you already developed some code? If yes: Post it as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Dec 2013 00:31:25 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2013-12-01T00:31:25Z</dc:date>
    <item>
      <title>Count regression code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160357#M41769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to run a regression where the dependent variable, Numcomment, is a count of number of comments a firm would receive. In the regression, I also need to control for industry fixed effects. Can someone provide me with the SAS code for count regression that controls for industry fixed effects?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Nov 2013 20:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160357#M41769</guid>
      <dc:creator>shalmali</dc:creator>
      <dc:date>2013-11-30T20:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Count regression code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160358#M41770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you expect anyone posting actual code without you providing sample data (a data step creating such data) and a description of how the result should look like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also: What are your thoughts about how this could be done? Have you already developed some code? If yes: Post it as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Dec 2013 00:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160358#M41770</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-12-01T00:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count regression code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160359#M41771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the incomplete information. The subset of data looks as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gvkey&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Numcomment&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; industry&lt;/P&gt;&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2001&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/P&gt;&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/P&gt;&lt;P&gt;002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2001&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 56&lt;/P&gt;&lt;P&gt;002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2002&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 56&lt;/P&gt;&lt;P&gt;003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&lt;/P&gt;&lt;P&gt;003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2002&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&lt;/P&gt;&lt;P&gt;004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2001&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/P&gt;&lt;P&gt;004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2002&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gvkey is the firm identtifier, Numcomment is the dependent variable and is the number of comments (count variable), X1 and X2 are some independent variables, and industry is the control for industry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two codes I got from my searches is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc genmod data = have ;&lt;/P&gt;&lt;P&gt;class gvkey industry;&lt;/P&gt;&lt;P&gt;model numcomment =x1 x2 industry/link=log dist=poisson;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc countreg data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model numcomment =x1 x2 industry / dist=poisson printall;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please tell me which of the above codes will be more appropriate when the dependent variable is a count? Also I need to control for industry fixed effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Dec 2013 03:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160359#M41771</guid>
      <dc:creator>shalmali</dc:creator>
      <dc:date>2013-12-01T03:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count regression code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160360#M41772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think there is no difference in the estimations parts of two PROC. but some additional features are different. &lt;/P&gt;&lt;P&gt;There are some major topics you should consider to check the appropriateness of your fitted model. One of them is zero inflated:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/322-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/322-2008.pdf&lt;/A&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;There are also AIC,BIC and overdispersion problems:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/372-2008.pdf" title="http://www2.sas.com/proceedings/forum2008/372-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/372-2008.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I think you should take consideration on your modeling strategy instead of choosing the more appropriate SAS procedure.&lt;/P&gt;&lt;P&gt;In the following paper, you can find approximately all you need for answering your question:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi26/p247-26.pdf" title="http://www2.sas.com/proceedings/sugi26/p247-26.pdf"&gt;http://www2.sas.com/proceedings/sugi26/p247-26.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Dec 2013 09:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-regression-code/m-p/160360#M41772</guid>
      <dc:creator>MohammadFayaz</dc:creator>
      <dc:date>2013-12-01T09:57:47Z</dc:date>
    </item>
  </channel>
</rss>

