Re: [R] R: Equivalence between lm and glm

2013-05-31 Thread peter dalgaard
On May 31, 2013, at 17:10 , Stefano Sofia wrote: > I find difficult to understand why in > lm(log(Y) ~ X) > Y is assumed lognormal. > I know that if Y ~ N then Z=exp(Y) ~ LN, and that if Y ~ LN then Z=log(Y) ~ N. > In > lm(log(Y) ~ X) > I assume Y ~ N(mu, sigma^2), and then exp(Y) would be distri

[R] R: Equivalence between lm and glm

2013-05-31 Thread Stefano Sofia
I find difficult to understand why in lm(log(Y) ~ X) Y is assumed lognormal. I know that if Y ~ N then Z=exp(Y) ~ LN, and that if Y ~ LN then Z=log(Y) ~ N. In lm(log(Y) ~ X) I assume Y ~ N(mu, sigma^2), and then exp(Y) would be distributed by a LN, not l og(Y). Where is my mistake? Moreover, in gl