[R] Equivalence between lm and glm
peter dalgaard
pdalgd at gmail.com
Wed May 29 18:51:47 CEST 2013
On May 29, 2013, at 17:23 , Stefano Sofia wrote:
>
> Dear R-users,
> in case of linear model,
> lm(Y ~ X)
> is equivalent to
> glm(Y ~ X, family=gaussian(link=identity))
>
> In case of the exponential model
> lm(log(Y) ~ X)
> why
> glm(Y ~ X, family=gaussian(link=log))
> is not equivalent?
Y is assumed lognormal in one case, normal in the other.
> Is there an equivalent glm to lm(log(Y) ~ X)?
>
Yes, glm(log(Y) ~ X, family=gaussian(link=identity))
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list