turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- GENMOD "Error in computing deviance function" for ...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-20-2012 01:55 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-21-2012 08:48 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-26-2012 01:38 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-26-2012 09:43 AM

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