[R] glm error: cannot correct step size

John Sorkin jsorkin at grecc.umaryland.edu
Wed Dec 30 14:50:50 CET 2009


R 2.8.1
windows XP

I am getting an error message that I don't understand when I try to run GLM. The error only occurs when I have all independent variables in the model. When I drop one independent variable, the model runs fine. Can anyone help me understand what the error means and how I can correct it?
Thank you,
John

> fit11<-glm(AAMTCARE~BMI+BMIsq+SEX+jPHI+jMEDICAID+factor(AgeCat)+
+ factor(jINDINC)+jMARSTAT+jEDUCATION+factor(jsmokercat)+factor(jrace),data=SimData,family=Gamma(link="log"))
Warning: step size truncated due to divergence
Error in glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart,  : 
  inner loop 1; cannot correct step size

# Drop factor(jrace) and model runs without a problem.
> fit11<-glm(AAMTCARE~BMI+BMIsq+SEX+jPHI+jMEDICAID+factor(AgeCat)+
+ factor(jINDINC)+jMARSTAT+jEDUCATION+factor(jsmokercat)       ,data=SimData,family=Gamma(link="log"))

# Drop jPHI and model runs without a problem.
> fit11<-glm(AAMTCARE~BMI+BMIsq+SEX+    jMEDICAID+factor(AgeCat)+
+ factor(jINDINC)+jMARSTAT+jEDUCATION+factor(jsmokercat)+jrace,data=SimData,family=Gamma(link="log"))

Thanks,
John


John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)

Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:6}}




More information about the R-help mailing list