st: Re: transforming predictions from loglinear models

 From "Christer Thrane" To Subject st: Re: transforming predictions from loglinear models Date Fri, 26 Aug 2005 18:47:34 +0200

Wooldridge shows you how to do this--se example 6.7 at:

http://fmwww.bc.edu/gstat/examples/wooldridge/wooldridge6.html

Best,

Christer

--
Professor Christer Thrane
Department of Social Science
Lillehammer University College
2626 Lillehammer, Norway

+ 47 61 28 81 70 (fax)
+ 47 61 28 82 47 (phone, work)
+ 47 61 25 53 04 (phone, home)

E-mail, work: christer.thrane@hil.no
E-mail, home: ch-thran@online.no

----- Original Message ----- From: <Colin.Vance@dlr.de>
To: <statalist@hsphsun2.harvard.edu>
Sent: Friday, August 26, 2005 10:49 AM
Subject: st: transforming predictions from loglinear models

Hello,

I want to estimate a simple log-linear OLS regression in Stata and then
use the model to generate predictions. Say the model looks like this:

regress ln_y ln_x1 ln_x2

where all the variables are in logs. After running the model, I'd like
to predict values of y over different values of x1, holding x2 fixed at
the mean. The problem is that my predicted y is in log form, which I
want to transform to y. One solution is to simply take exp(prediction of
ln_y), but this has been shown to result in a biased predictor. The
following article discusses various techniques for dealing with this,
focusing specifically on a Laplace conversion:

van Garderen, Kees Jan, 2001.
"Optimal prediction in loglinear models," Journal of Econometrics,
Elsevier, vol. 104(1), pages 119-140

Does anyone know if any such techniques have been implemented in Stata?
Would predictnl do the trick, as in:

predictnl yhat = exp(_b[cons] + _b[ln_x1]*ln_x1 + _b[ln_x2]*ln_x2],
se(yhat_se)
Many thanks for any input,

Colin

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