[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: Generating predicted values for OLS with transformed dependent variables
On Apr 12, 2006, at 9:31 AM, Nick Cox wrote:
As posted earlier, -glm- offers the back-to-basics Jacobin solution
as an alternative to this use of Jacobians.
On Apr 12, 2006, at 11:00 AM, Rodrigo A. Alfaro wrote:
I didn't explore glm command before, then I tried the following:
glm price, family(normal) link(log) nohead nolog
reg lnp, nohead
and the coefficient (let's say mu) is different. Is there somethig
than I am missing? a normalization issue?
To expand on Nick's suggestion, one of the primary features of the
GLM approach (as opposed to modeling a transformed variable) is to
obtain predictions on the raw (i.e., untransformed) scale. So GLM is
absolutely an important alternative to consider if this is a
The reason your results are different is that you've fit two
different models. They are:
E[log(price)] = XB (fit by -regress-, generating B_hat)
log(E[price]) = XG (fit by -glm-)
One can show that under certain conditions, you can consistently
estimate G by B_hat (except for the intercept), but if those
conditions aren't met, B_hat will be estimating something different.
Naively assuming that B_hat estimates G is a common mistake people
make when interpreting the results of a regression on a transformed
The documentation on -glm- in [R] is a good start, but if you're
using this for anything important, I'd strongly suggest picking up a
copy of Generalized Linear Models (by McCullagh and Nelder), in
particular the chapters "An outline of generalized linear models" and
"Models with constant coefficient of variation".
* For searches and help try: