John Sorkin
2008-Dec-09 18:50 UTC
[R] glm error message when using family Gamma(link="inverse")
R 2.5 windows XP I am getting an error from glm() that I don't understand. Any help or suggestions would be appreciated. N.B. 1<=AAMTCAREJ<=327900> summary(data$AAMTCAREJ)Min. 1st Qu. Median Mean 3rd Qu. Max. 1.0 404.3 1430.0 6567.0 5457.0 327900.0> fitglm<-glm(AAMTCAREJ~sexcat+H_AGE+SmokeCat+InsuranceCat+MedicadeCat++ incomegrp+racecat+MARSTATJS+EdCat+bmiNewjohn,data=data,family=Gamma(link = "inverse")) Error: no valid set of coefficients has been found: please supply starting values In addition: Warning message: NaNs produced in: log(x) 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}}
Prof Brian Ripley
2008-Dec-09 19:11 UTC
[R] glm error message when using family Gamma(link="inverse")
On Tue, 9 Dec 2008, John Sorkin wrote:> R 2.5Please 1) do as the posting guide asks, and quote version numbers accurately. 2) do as the posting guide asks, and update *before* posting. That's too old a version to support here.> windows XP > > I am getting an error from glm() that I don't understand. Any help or suggestions would be appreciated. N.B. 1<=AAMTCAREJ<=327900 > >> summary(data$AAMTCAREJ) > Min. 1st Qu. Median Mean 3rd Qu. Max. > 1.0 404.3 1430.0 6567.0 5457.0 327900.0 > > >> fitglm<-glm(AAMTCAREJ~sexcat+H_AGE+SmokeCat+InsuranceCat+MedicadeCat+ > + incomegrp+racecat+MARSTATJS+EdCat+bmiNewjohn,data=data,family=Gamma(link = "inverse")) > Error: no valid set of coefficients has been found: please supply starting values > In addition: Warning message: > NaNs produced in: log(x)That model is not necessarily valid: the linear predictor has to be strictly positive. If you really know why it is applicable you will be able to give starting values (e.g. maybe all the columns of the design matrix are positive, in which case you will be able to find suitable positive initial coefficients).> 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 ...{{dropped:19}}
Apparently Analagous Threads
- Obtaining partial output from a function that does not run to completion.
- Contrasts with an interaction. How does one specify the dummy variables for the interaction
- How to extract auc, specificity and sensitivity
- Logistic regression/Cut point? predict ??
- Problems getting slope and intercept to change when do multiple reps.