11-20-2012 01:55 PM
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 --
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.
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).
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.