Linear model with log-transformed response vs. generalized linear model with log link - Cross Validated most recent 30 from stats.stackexchange.com 2019-07-17T08:30:52Z https://stats.stackexchange.com/feeds/question/47840 http://www.creativecommons.org/licenses/by-sa/3.0/rdf https://stats.stackexchange.com/q/47840 42 Linear model with log-transformed response vs. generalized linear model with log link miura https://stats.stackexchange.com/users/10064 2013-01-16T10:01:29Z 2018-07-23T04:25:36Z <p>In <a href="http://faculty.washington.edu/heagerty/Courses/b571/homework/Lindsey-Jones-1998.pdf">this paper</a> titled "CHOOSING AMONG GENERALIZED LINEAR MODELS APPLIED TO MEDICAL DATA" the authors write:</p> <blockquote> <p>In a generalized linear model, the mean is transformed, by the link function, instead of transforming the response itself. The two methods of transformation can lead to quite different results; for example, <strong>the mean of log-transformed responses is not the same as the logarithm of the mean response</strong>. In general, the former cannot easily be transformed to a mean response. Thus, transforming the mean often allows the results to be more easily interpreted, especially in that mean parameters remain on the same scale as the measured responses.</p> </blockquote> <p>It appears they advise the fitting of a generalized linear model (GLM) with log link instead of a linear model (LM) with log-transformed response. I do not grasp the advantages of this approach, and it seems quite unusual to me.</p> <p>My response variable looks log-normally distributed. I get similar results in terms of the coefficients and their standard errors with either approach.</p> <p>Still I wonder: If a variable has a log-normal distribution, isn't <strong>the mean of the log-transformed variable</strong> preferable over <strong>the log of the mean untransformed variable</strong>, as the mean is the natural summary of a normal distribution, and the log-transformed variable is normally distributed, whereas the variable itself is not?</p> https://stats.stackexchange.com/questions/47840/-/48679#48679 44 Answer by Corone for Linear model with log-transformed response vs. generalized linear model with log link Corone https://stats.stackexchange.com/users/19879 2013-01-28T10:23:04Z 2018-04-13T15:28:46Z <p>Although it may appear that the mean of the log-transformed variables is preferable (since this is how log-normal is typically parameterised), from a practical point of view, the log of the mean is typically much more useful.</p> <p>This is particularly true when your model is not exactly correct, and to quote George Box: <em>"All models are wrong, some are useful"</em></p> <p>Suppose some quantity is log normally distributed, blood pressure say (I'm not a medic!), and we have two populations, men and women. One might hypothesise that the average blood pressure is higher in women than in men. <strong>This exactly corresponds to asking whether log of average blood pressure is higher in women than in men. It is not the same as asking whether the average of log blood pressure is higher in women that man</strong>.</p> <p>Don't get confused by the text book parameterisation of a distribution - it doesn't have any "real" meaning. The log-normal distribution is parameterised by the mean of the log ($\mu_{\ln}$) because of mathematical convenience, but equally we could choose to parameterise it by its actual mean and variance</p> <p>$\mu = e^{\mu_{\ln} + \sigma_{\ln}^2/2}$</p> <p>$\sigma^2 = (e^{\sigma^2_{\ln}} -1)e^{2 \mu_{\ln} + \sigma_{\ln}^2}$</p> <p>Obviously, doing so makes the algebra horribly complicated, but it still works and means the same thing.</p> <p>Looking at the above formula, we can see an important difference between transforming the variables and transforming the mean. The log of the mean, $\ln(\mu)$, increases as $\sigma^2_{\ln}$ increases, while the mean of the log, $\mu_{\ln}$ doesn't.</p> <p>This means that women could, on average, have higher blood pressure that men, even though the mean paramater of the log normal distribution ($\mu_{\ln}$) is the same, simply because the variance parameter is larger. This fact would get missed by a test that used log(Blood Pressure).</p> <p>So far, we have assumed that blood pressure genuinly is log-normal. If the true distributions are not quite log normal, then transforming the data will (typically) make things even worse than above - since we won't quite know what our "mean" parameter actually means. I.e. we won't know those two equations for mean and variance I gave above are correct. Using those to transform back and forth will then introduce additional errors.</p> https://stats.stackexchange.com/questions/47840/-/120048#120048 17 Answer by Meg for Linear model with log-transformed response vs. generalized linear model with log link Meg https://stats.stackexchange.com/users/30488 2014-10-14T22:40:06Z 2014-10-14T23:23:26Z <p>Here are my two cents from an advanced data analysis course I took while studying biostatistics (although I don't have any references other than my professor's notes):</p> <p>It boils down to whether or not you need to address linearity and heteroscedasticity (unequal variances) in your data, or just linearity.</p> <p>She notes that transforming the data affects both the linearity and variance assumptions of a model. For example, if your residuals exhibit issues with both, you could consider transforming the data, which potentially could fix both. The transformation transforms the errors and thus their variance.</p> <p>In contrast, using the link function only affects the linearity assumption, not the variance. The log is taken of the mean (expected value), and thus the variance of the residuals is not affected.</p> <p>In summary, if you don't have an issue with non-constant variance, she suggests using the link function over transformation, because you don't <em>want</em> to change your variance in that case (you're already meeting the assumption).</p> https://stats.stackexchange.com/questions/47840/-/358492#358492 -1 Answer by Md Ahshanul Haque for Linear model with log-transformed response vs. generalized linear model with log link Md Ahshanul Haque https://stats.stackexchange.com/users/215406 2018-07-23T03:55:54Z 2018-07-23T04:25:36Z <p>If the response veritable is not symmetric (not distributed as normal) but log transformed response is normal then linear regression on transformed response be used and the exponent coefficient gives us the ration of geometric mean.</p> <p>If the response veritable is symmetric (distributed as normal) but relation between explanatory (X) and response is not linear but log expected value is linear function of X then GLM with log link be used and exponent coefficient gives us the ratio of arithmetic mean</p>