<?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: Poisson Regression for Panel Data PROC GENMOD in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/343301#M2230</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. To perform Poisson regression with random effects, use PROC GLIMMIX:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glimmix_toc.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glimmix_toc.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. For models that incorporate spatial components, for linear models see the new PROC SPATIALREG routine in SAS/ETS version 14.2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/onlinedoc/ets/142/spatialreg.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/ets/142/spatialreg.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SPATIALREG is for linear models. &amp;nbsp;For Poisson models with spatial components see PROC COUNTREG, which has recently added statements that fit spatial models:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/onlinedoc/ets/142/countreg.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/ets/142/countreg.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2017 14:50:54 GMT</pubDate>
    <dc:creator>bobby_sas</dc:creator>
    <dc:date>2017-03-22T14:50:54Z</dc:date>
    <item>
      <title>Poisson Regression for Panel Data PROC GENMOD</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/309234#M2003</link>
      <description>&lt;P&gt;I have panel data such that two cross sections of a firm are analyzed over time, and the response variable takes on non-negative integer values (i.e. count data.). I'd like to estimate this model using Poisson Regression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; model_data&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;input&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;date&lt;/SPAN&gt; counts x1 x2 x3&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
datalines&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

January&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;01&lt;/SPAN&gt;  &lt;SPAN class="token number"&gt;14&lt;/SPAN&gt;   &lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;  &lt;SPAN class="token number"&gt;6.5&lt;/SPAN&gt;  &lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;45&lt;/SPAN&gt;
January&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;01&lt;/SPAN&gt;  &lt;SPAN class="token number"&gt;21&lt;/SPAN&gt;   &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;  &lt;SPAN class="token number"&gt;6.5&lt;/SPAN&gt;  &lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;45&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;March&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;04&lt;/SPAN&gt;    &lt;SPAN class="token number"&gt;24&lt;/SPAN&gt;   &lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;  &lt;SPAN class="token number"&gt;4.5&lt;/SPAN&gt;   &lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;55&lt;/SPAN&gt;March&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;04&lt;/SPAN&gt;    &lt;SPAN class="token number"&gt;26&lt;/SPAN&gt;   &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;  &lt;SPAN class="token number"&gt;4.5&lt;/SPAN&gt;   &lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;55&lt;/SPAN&gt;	&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;    &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ln(counts) = B0 + B1 x1 + B2 x2 + B3 x3 ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've estimated this model in SAS with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;genmod&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; model_data&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token statement"&gt;class&lt;/SPAN&gt; x1 &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; param&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;glm&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;model&lt;/SPAN&gt; counts &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; x1 x2 x3 &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; dist&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;poisson&lt;/SPAN&gt; link&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt; scale&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;pearson type1 type3 &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
output &lt;SPAN class="token keyword"&gt;put&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;poisson_out&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where x1 is the cross section of the data analyzed over time, and x2 and x3 are continuous predictor variables, using a pearson correction for overdispersion. Is PROC GENMOD able to analyze this type of data? I have found plenty of examples for purely cross sectional data, but there is an absence of discussion about using this for panel data. If PROC GENMOD is not capable of analyzing panel data, is PROC TCOUNTREG a viable alternative?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 12:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/309234#M2003</guid>
      <dc:creator>eric_sas_1</dc:creator>
      <dc:date>2016-11-04T12:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Poisson Regression for Panel Data PROC GENMOD</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/309735#M2005</link>
      <description>&lt;P&gt;While your data is "panel data" in the strict sense, the fact that you only have two cross sections means that you probably shouldn't use typical panel data estimators that rely on the number of cross sections to be somewhat larger than two.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your approach with PROC GENMOD using the cross section ID as a binary covariate is a good one for these data. As you demonstrate, PROC GENMOD allows you to set the link and allows you to model overdispersion. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Bobby&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 14:35:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/309735#M2005</guid>
      <dc:creator>bobby_sas</dc:creator>
      <dc:date>2016-11-07T14:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Poisson Regression for Panel Data PROC GENMOD</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/342910#M2224</link>
      <description>&lt;P&gt;Thanks for the reply. The data is illustrative. In reality, I have data that can be bucketed in any number of ways, depending on the question/analysis to be performed. Given that you've stated that PROC GENMOD is appropriate for panel estimation, I have two follow up questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Is GENMOD capable or handling random effects, of just FE (using the CLASS statement)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Is there any straightforward way to test for spatial and/or temporal autocorrelation using GENMOD? Is not, are that any alternative PROCs that would be of value here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 12:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/342910#M2224</guid>
      <dc:creator>eric_sas_1</dc:creator>
      <dc:date>2017-03-21T12:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Poisson Regression for Panel Data PROC GENMOD</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/343301#M2230</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. To perform Poisson regression with random effects, use PROC GLIMMIX:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glimmix_toc.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glimmix_toc.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. For models that incorporate spatial components, for linear models see the new PROC SPATIALREG routine in SAS/ETS version 14.2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/onlinedoc/ets/142/spatialreg.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/ets/142/spatialreg.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SPATIALREG is for linear models. &amp;nbsp;For Poisson models with spatial components see PROC COUNTREG, which has recently added statements that fit spatial models:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/onlinedoc/ets/142/countreg.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/ets/142/countreg.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 14:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Poisson-Regression-for-Panel-Data-PROC-GENMOD/m-p/343301#M2230</guid>
      <dc:creator>bobby_sas</dc:creator>
      <dc:date>2017-03-22T14:50:54Z</dc:date>
    </item>
  </channel>
</rss>

