# st: Re: RE: Re: Generating predicted values for OLS with transformed dependent variables

 From "Rodrigo A. Alfaro" To Subject st: Re: RE: Re: Generating predicted values for OLS with transformed dependent variables Date Wed, 12 Apr 2006 12:00:04 -0400

```Dear Nick:

I didn't explore glm command before, then I tried the following:

sysuse auto
g lnp=ln(price)

and the coefficient (let's say mu) is different. Is there somethig than
I am missing? a normalization issue?

----- Original Message -----
From: "Nick Cox" <n.j.cox@durham.ac.uk>
To: <statalist@hsphsun2.harvard.edu>
Sent: Wednesday, April 12, 2006 9:31 AM
Subject: st: RE: Re: Generating predicted values for OLS with transformed
dependent variables

As posted earlier, -glm- offers the back-to-basics
Jacobin solution as an alternative to this use
of Jacobians.

Nick
n.j.cox@durham.ac.uk

Rodrigo A. Alfaro

> Let me simplify the problem. Considere u~normal(0,s_u^2) and
> g(y)=u. You
> want E(y)... right? Sometimes you can find the distribution
> of y using the
> jacobian transformation. Suppose that h() is the inverse of g() then
> y=h(u)... then you need to find the distribution of y. This
> is a change of
> variable, you have to evaluate the normal with h() and
> multiply by the
> jacobian.
>
> Confuse? take g() =ln()... then ln(y)=u which is a
> simplification of the
> inverse of g()
> is known then h()=exp() and finally y=exp(u). You need to know the
> distribution of y, which is lognormal!!!
> (http://www.xycoon.com/logn_relationships1.htm). Using this
> distribution we
> can get the expected value of y E(y) = exp(0+0.5*s_u^2)
> (http://www.xycoon.com/logn_expectedvalue.htm). If
> ln(y)=bx+u, you can find
> that for nonstochastic x
> E(y)=exp(bx+0.5*s_u^2)=exp(bx)*exp(0.5*s_u^2), the
> second term is the "adjustment".
>
> In your problem you have to find the distribution of y for y=u^4 and
> u~normal. I understand that you cannot use the jacobian
> transformation, but
> the proof of "the square of a standard normal is a chi-square
> 1" is a useful
> source to solve your problem.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```