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

RE: st: help log linear


From   "Vincenzo Verardi" <vincenzo_verardi@hotmail.com>
To   statalist@hsphsun2.harvard.edu
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

regards

Vincenzo

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).


From: cas2111@columbia.edu
Reply-To: statalist@hsphsun2.harvard.edu
To: statalist@hsphsun2.harvard.edu
Subject: st: help log linear
Date: Sat, 21 Feb 2004 22:35:35 -0500


Hi,

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,
cheryl
*
*   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/
_________________________________________________________________
Charla con tus amigos en línea mediante MSN Messenger: http://messenger.latam.msn.com/

*
* 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/




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