Dear all,

I am using the book "Generalized Linera Models and Extension" by Hardin and
Hilbe (second edition, 2007) at the moment. The authors suggest that
instead of OLS models, "the log link is generally used for response data
that take only positive values on the continuous scale". Of course they
also suggest residual plots to check whether a "normal" linera model using
an identity link can still be used.

I am trying to replicate in R what they do in the book in STATA. Indeed, I
have no problems in STATA with the log link. However, when calling the same
model using R's glm-function, but specifying *family=gaussian(link="log") *I
am asked to provide starting values. When I set them all equal to zero, I
always get the message that the algorithm did not converge. Picking other
values the message is sometimes the same, but more often I get:
*
*
*Error in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  : *
*  NA/NaN/Inf in 'x' *
*
*
As I said, in STATA I can run these models without setting starting values
and without errors. I tried many different models, and different datasets,
but the problem is always the same (unless I only include one single
independent variable). Could anyone tell me why this is the case, or what I
do wrong, or why the suggested models from the book might not be
appropriate? I'd appreciate any help!

Best,
Florian

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to