<?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: Modeling time series with Quasi-Poisson reggression in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830897#M4495</link>
    <description>Thank you so much for the quick response,&lt;BR /&gt;I have few more issue to follow-up.&lt;BR /&gt;a. I am looking for the quasi-Poisson regression, however you are using just the Poisson regression. I was not able to find how we can define quasi-Poisson regression in the distribution assumption with proc glimmix.&lt;BR /&gt;&lt;BR /&gt;b. Can i forecast the number of count in 2020 based on the model?&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 29 Aug 2022 14:31:45 GMT</pubDate>
    <dc:creator>Ishor</dc:creator>
    <dc:date>2022-08-29T14:31:45Z</dc:date>
    <item>
      <title>Modeling time series with Quasi-Poisson reggression</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830605#M4492</link>
      <description>&lt;P&gt;I would really appreciate if someone could provide me the syntax for conducting&amp;nbsp; Quasi- Poisson regression with spline. Please find the sample data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data have;&lt;BR /&gt;input Year month $ count;&lt;BR /&gt;cards;&lt;BR /&gt;2017 Jan 0&lt;BR /&gt;2017 Feb 0&lt;BR /&gt;2017 Mar 2&lt;BR /&gt;2017 Apr 3&lt;BR /&gt;2017 May 1&lt;BR /&gt;2017 Jun 6&lt;BR /&gt;2017 Jul 12&lt;BR /&gt;2017 Aug 23&lt;BR /&gt;2017 Sept 25&lt;BR /&gt;2017 Oct 39&lt;BR /&gt;2017 Nov 40&lt;BR /&gt;2017 Dec 45&lt;BR /&gt;2018 Jan 44&lt;BR /&gt;2018 Feb 40&lt;BR /&gt;2018 Mar 38&lt;BR /&gt;2018 Apr 37&lt;BR /&gt;2018 May 35&lt;BR /&gt;2018 Jun 34&lt;BR /&gt;2018 Jul 24&lt;BR /&gt;2018 Aug 23&lt;BR /&gt;2018 Sept 25&lt;BR /&gt;2018 Oct 39&lt;BR /&gt;2018 Nov 40&lt;BR /&gt;2018 Dec 45&lt;BR /&gt;2019 Jan 0&lt;BR /&gt;2019 Feb 0&lt;BR /&gt;2019 Mar 2&lt;BR /&gt;2019 Apr 3&lt;BR /&gt;2019 May 1&lt;BR /&gt;2019 Jun 6&lt;BR /&gt;2019 Jul 12&lt;BR /&gt;2019 Aug 23&lt;BR /&gt;2019 Sept 25&lt;BR /&gt;2019 Oct 39&lt;BR /&gt;2019 Nov 40&lt;BR /&gt;2019 Dec 45&lt;BR /&gt;; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 14:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830605#M4492</guid>
      <dc:creator>Ishor</dc:creator>
      <dc:date>2022-08-26T14:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Modeling time series with Quasi-Poisson reggression</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830710#M4493</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not giving any guarantees here, but I think&lt;/P&gt;
&lt;P&gt;you can estimate Quasi-Poisson regression by using PROC GLIMMIX and directly specifying &lt;BR /&gt;the functional relationship between the variance and the mean &lt;BR /&gt;and making no distributional assumption in the MODEL statement, as demonstrated below :&lt;/P&gt;
&lt;P&gt;( Note also the spline effect ! )&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data = work.have;
  effect spl = spline(X);
  model Y = spl / link = log solution;
  _variance_ = _mu_;
  random _residual_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xisDoc-refProc"&gt;
&lt;DIV id="etsug.countreg.cntpoissonreg" class="aa-section"&gt;
&lt;P class="xisDoc-paragraph"&gt;The Poisson model has been criticized for its restrictive property that the conditional variance must equal the conditional mean. Real-life data are often characterized by &lt;SPAN&gt;&lt;EM&gt;overdispersion&lt;/EM&gt;&lt;/SPAN&gt; (that is, the variance exceeds the mean). Allowing for overdispersion can improve model predictions because the Poisson restriction of equal mean and variance results in the underprediction of zeros when overdispersion exists. The most commonly used model that accounts for overdispersion is the negative binomial model. Conway-Maxwell-Poisson regression enables you to model both overdispersion and underdispersion.&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;Cheers,&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;Koen&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 27 Aug 2022 00:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830710#M4493</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-08-27T00:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Modeling time series with Quasi-Poisson reggression</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830754#M4494</link>
      <description>&lt;P&gt;Adapted from the SAS code provided with &lt;A href="https://www.utstat.utoronto.ca/reid/sta2201s/QUASI-POISSON.pdf" target="_self"&gt;this publication&lt;/A&gt;, you could start with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data have;
input year $ month $ count;
monthDate = input(cats("01", substr(month, 1, 3), year), date9.);
drop year month;
format monthDate yymmdd10.;
cards;
2017 Jan 0
2017 Feb 0
2017 Mar 2
2017 Apr 3
2017 May 1
2017 Jun 6
2017 Jul 12
2017 Aug 23
2017 Sept 25
2017 Oct 39
2017 Nov 40
2017 Dec 45
2018 Jan 44
2018 Feb 40
2018 Mar 38
2018 Apr 37
2018 May 35
2018 Jun 34
2018 Jul 24
2018 Aug 23
2018 Sept 25
2018 Oct 39
2018 Nov 40
2018 Dec 45
2019 Jan 0
2019 Feb 0
2019 Mar 2
2019 Apr 3
2019 May 1
2019 Jun 6
2019 Jul 12
2019 Aug 23
2019 Sept 25
2019 Oct 39
2019 Nov 40
2019 Dec 45
; 
proc glimmix data=have;
effect splDate = spline(monthDate);
model count = splDate / dist=Poisson covb ddfm = residual;
random _residual_;
output out=glmixout pred(noblup ilink) = p 
                        lcl(noblup ilink)= l 
                        ucl(noblup ilink)= u;
run;

proc sgplot data=glmixout;
band x=monthDate lower=l upper=u;
scatter y=count x=monthDate;
series y=p x=monthDate;
xaxis type=time;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PGStats_0-1661631879971.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74789i1E43F26633ED8285/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PGStats_0-1661631879971.png" alt="PGStats_0-1661631879971.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;(Not sure the confidence interval makes much sense at the beginning of the series... )&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2022 20:30:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830754#M4494</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-08-27T20:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Modeling time series with Quasi-Poisson reggression</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830897#M4495</link>
      <description>Thank you so much for the quick response,&lt;BR /&gt;I have few more issue to follow-up.&lt;BR /&gt;a. I am looking for the quasi-Poisson regression, however you are using just the Poisson regression. I was not able to find how we can define quasi-Poisson regression in the distribution assumption with proc glimmix.&lt;BR /&gt;&lt;BR /&gt;b. Can i forecast the number of count in 2020 based on the model?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Aug 2022 14:31:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830897#M4495</guid>
      <dc:creator>Ishor</dc:creator>
      <dc:date>2022-08-29T14:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Modeling time series with Quasi-Poisson reggression</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830981#M4499</link>
      <description>&lt;P&gt;a) The quasi-Poisson regression is requested with the RANDOM _RESIDUAL_ statement, as explained &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glimmix_syntax24.htm" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;b) IMHO, extrapolation using splines is nearly impossible, since the spline is fitted segment by segment (between knots), i.e. there is not even a function defined beyond the last knot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 19:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modeling-time-series-with-Quasi-Poisson-reggression/m-p/830981#M4499</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-08-29T19:19:18Z</dc:date>
    </item>
  </channel>
</rss>

