Programming the statistical procedures from SAS

GENMOD "Error in computing deviance function" for dist = gam

Reply
Contributor
Posts: 27

GENMOD "Error in computing deviance function" for dist = gam

Hi!


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.;
RUN;

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.

Thanks!

--  TMK  --

Respected Advisor
Posts: 2,655

Re: GENMOD "Error in computing deviance function" for dist = gam

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

Contributor
Posts: 27

Re: GENMOD "Error in computing deviance function" for dist = gam

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).

Respected Advisor
Posts: 2,655

Re: GENMOD "Error in computing deviance function" for dist = gam

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

Ask a Question
Discussion stats
  • 3 replies
  • 958 views
  • 0 likes
  • 2 in conversation