1
I have the problem to define a "Generalized linear model" with the lognormal distribution. Simply the function glm
does not accept this distribution and I saw the suggestion to use the following command:
glm(y ~ a+b+c, family=gaussian(link="log"))
or
glm(log(y)~ a+b+c, family=gaussian)
Where y has lognormal distribution.
But I wondered if this is the best connection function, because appears the following message from erro glm.fit: algoritmo não convergiu
in the first case.
Another option gamlss package, but this hasn’t explored yet.
Unfortunately, this question cannot be reproduced by anyone trying to answer it. Please, take a look at this link and see how to ask a reproducible question in R. So, people who wish to help you will be able to do this in the best possible way.
– Marcus Nunes
This error must have to do with the existence of non-positive values in
y
, for whichlog
is not defined.– Rui Barradas