<?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: GENMOD &amp;quot;Error in computing deviance function&amp;quot; for dist = gam in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131051#M6871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would seriously consider changing the link from the default inverse to the log.&amp;nbsp; I know it is not the canonical link, but it does restrict the parameters to a "proper" space.&amp;nbsp; That is why the default link for the gamma distribution in PROC GLIMMIX is the log link. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it is likely that the convergence criteria need some fiddling--more iterations are the most likely solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Nov 2012 13:48:13 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2012-11-21T13:48:13Z</dc:date>
    <item>
      <title>GENMOD "Error in computing deviance function" for dist = gam</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131050#M6870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I set up a standard gamma regression in PROC GENMOD as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC GENMOD DATA = &amp;amp;inds. (where = (&amp;amp;dv. &amp;gt; 0));&lt;BR /&gt; MODEL &amp;amp;dv. = &amp;amp;ivlist. / dist = gam;&lt;BR /&gt; OUTPUT OUT = &amp;amp;outds. p = pred_&amp;amp;dv.;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and got the following response:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: The specified model did not converge.&lt;BR /&gt;ERROR:&amp;nbsp; Error in computing deviance function.&lt;BR /&gt;NOTE: The scale parameter was estimated by maximum likelihood.&lt;BR /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I then attempted to perform a standard OLS on this data (I just changed&lt;BR /&gt;the dist= value from "gam" to "nor"), and that converged successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assumed from standard practice that a gamma regression was appropriate&lt;BR /&gt;for this data (it's a typical insurance loss model).&amp;nbsp; I did not transform&lt;BR /&gt;the dependent variable (or the regressors) beforehand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas / feedback are welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;nbsp; TMK&amp;nbsp; --&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 18:55:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131050#M6870</guid>
      <dc:creator>topkatz</dc:creator>
      <dc:date>2012-11-20T18:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: GENMOD "Error in computing deviance function" for dist = gam</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131051#M6871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would seriously consider changing the link from the default inverse to the log.&amp;nbsp; I know it is not the canonical link, but it does restrict the parameters to a "proper" space.&amp;nbsp; That is why the default link for the gamma distribution in PROC GLIMMIX is the log link. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it is likely that the convergence criteria need some fiddling--more iterations are the most likely solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 13:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131051#M6871</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-11-21T13:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: GENMOD "Error in computing deviance function" for dist = gam</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131052#M6872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the response!&amp;nbsp; That's an interesting observation about the link function, I wonder why GLIMMIX uses a different default for the gamma?&amp;nbsp; But I may try the log when I get the chance (I'm going to try the ITPRINT option first to see if I can get any more diagnostic info).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 06:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131052#M6872</guid>
      <dc:creator>topkatz</dc:creator>
      <dc:date>2012-11-26T06:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: GENMOD "Error in computing deviance function" for dist = gam</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131053#M6873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I have this right, but I think the log link will result in a constant coefficient of variation across values, while the inverse may not.&amp;nbsp; My friend Google seems to think that a gamma distribution with a log link is a lot more common for econometric data, so if that is what you are looking at, it may be helpfult to switch.&amp;nbsp; I would also strongly recommend searching the listserv archives for SAS-L. See what you can find from Dale McLerran and David Cassell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 14:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-quot-Error-in-computing-deviance-function-quot-for-dist/m-p/131053#M6873</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-11-26T14:43:16Z</dc:date>
    </item>
  </channel>
</rss>

