# What is the difference between lm(log(y) ~ x) and glm(y ~ x, family = gaussian(link = "log"))? [duplicate]

Is all in the title. I would like to know if there is any difference in terms of coefficients, residuals, p-values, but also conceptually.

• The difference is in how the errors are modeled. You should look up the formulas. I'd guess there should be some duplicates here already. Mar 28, 2015 at 14:56
• In the first case, you assume that log(y) is normal given x (and that the mean of log(y) is a linear function of x), and in the second case you assume that y itself is normal given x (and the log of its mean is a linear function of x). These are two different models, and may potentially give very different answers. Mar 28, 2015 at 15:52
• Just to add to @Roland’s comment: If you model log(y) ~ x, you assume that log(y) equals a linear function of x plus an error term (which is normally distributed). This means that y equals a (non-linear) function of x times an error term (which is log-normally distributed). Mar 28, 2015 at 15:55
• @KarlOveHufthammer, your comments seem to have the makings of an answer (& I think a better answer than those at the other Q, including mine). Why not turn them into an official answer here before this gets closed? Mar 29, 2015 at 1:29
• Although none of them are close duplicates, you may get some benefit from this question or this one and possibly even this answer or this question Mar 29, 2015 at 9:31