BookmarkSubscribeRSS Feed
Obsidian | Level 7


I set up a standard gamma regression in PROC GENMOD as follows:

PROC GENMOD DATA = &inds. (where = (&dv. > 0));
MODEL &dv. = &ivlist. / dist = gam;
OUTPUT OUT = &outds. p = pred_&dv.;

and got the following response:

WARNING: The specified model did not converge.
ERROR:  Error in computing deviance function.
NOTE: The scale parameter was estimated by maximum likelihood.

I then attempted to perform a standard OLS on this data (I just changed
the dist= value from "gam" to "nor"), and that converged successfully.

I assumed from standard practice that a gamma regression was appropriate
for this data (it's a typical insurance loss model).  I did not transform
the dependent variable (or the regressors) beforehand.

Any ideas / feedback are welcome.


--  TMK  --

Jade | Level 19

I would seriously consider changing the link from the default inverse to the log.  I know it is not the canonical link, but it does restrict the parameters to a "proper" space.  That is why the default link for the gamma distribution in PROC GLIMMIX is the log link.

Also, it is likely that the convergence criteria need some fiddling--more iterations are the most likely solution.

Steve Denham

Obsidian | Level 7

Thank you for the response!  That's an interesting observation about the link function, I wonder why GLIMMIX uses a different default for the gamma?  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).

Jade | Level 19

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.  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.  I would also strongly recommend searching the listserv archives for SAS-L. See what you can find from Dale McLerran and David Cassell.

Steve Denham


Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2 in conversation