Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: help log linear

From   "Vincenzo Verardi" <>
Subject   RE: st: help log linear
Date   Sun, 22 Feb 2004 20:10:47 -0400

Hello, I'm not shure if I understood properly the question but I would do:

1) run the regression lny=xb

the I would type the command

predict lnyhat, xb

2) I would then exponentiate my result generating a new variable

gen ypred=exp(lnyhat)

I would then have the predicted y.

3) For the regression without the constant, I would type:

reg lny x, noconst

I hope this helps



P.S. if it is a log-lin regression with an explanotary dummy variable, take care on how to read the coefficient associated to the dummy (exp(beta)-1).

Subject: st: help log linear
Date: Sat, 21 Feb 2004 22:35:35 -0500


I am having a bit of difficulties figuring out how to predict a y
in a log linear model.  I cannot determine the following items:

1)obtaining fitted values of logy(i) from the regression of logy
on each independent x
2)for each observation i, creating a variable equal to exp(logy(i))
3)performing a regression through the origin

Any other information that could be provide to assist in running a
log linear regression would be greatly appreciated.

I could not find anything in my manual about it.

Thank you,
*   For searches and help try:
Charla con tus amigos en línea mediante MSN Messenger:

* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index