[R] glm error message when using family Gamma(link=inverse)

Terry Therneau therneau at mayo.edu
Wed Dec 10 15:28:03 CET 2008


John,
  You have specified a model with
  	E(y) = 1/eta where eta = X beta is the linear predictor
and
	E(y) must be >0, since the family is Gamma
	
and
	you have a lot of covariates in the model.
	

 glm now has to try to find a best linear predictor, but under the constraint 
that eta>0 for every single one of the observations (the log-likelihood involves 
a log(eta) term).  The internal computational engine of glm is not designed to 
solve the general constrained problem.  The message you are getting can be 
rephrased as "I tried my best, but I'm lost".  
 
   If a. the actual MLE is not on the boundary and b. you give it starting 
estimates that are close enough to the final solution so that the interation 
path never steps over the boundary on its way to the solution; then all will be 
well.  Sometimes you can use the estimates from a model with fewer terms as the 
starting point.  
   If the MLE lies on the boundary, which is not unlikely when there are a large 
number of significant variables, then life is much harder. 
   I have encountered the same issues with additive risk models.
   
   	Terry Therneau



More information about the R-help mailing list