How to perform a GLM of a variable with lognormal distribution in R?

Asked

Viewed 237 times

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.

  • 1

    This error must have to do with the existence of non-positive values in y, for which log is not defined.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.