[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
David Gottschlich <davidgottschlich@comcast.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: help log linear |

Date |
Sun, 22 Feb 2004 18:40:06 -0500 |

I seem to have gotten this a long time after you sent it, so you may have the answer already (and please forgive me if I giving the wrongly simple answer to a complex question), but....

predict logy

will give you the predicted result for each independent x; of course, this will be in log space.

If you used the natural log, then

generate predicty=exp(logy)

will convert the predictions back to real space

or

generate predicty=10^logy

works if you used the common log.

For most (many?) applications, it's more common to use the form

y=a ln(x) + b

than

ln(y)=a x + b

If you are using the second form, of course you cannot force y to equal zero unless you can reach negative infinity from your function.

David

cas2111@columbia.edu wrote:

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/

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

**References**:**st: help log linear***From:*cas2111@columbia.edu

- Prev by Date:
**st: help log linear** - Next by Date:
**RE: st: help log linear** - Previous by thread:
**st: help log linear** - Next by thread:
**RE: st: help log linear** - Index(es):

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