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

st: transforming predictions from loglinear models


From   <Colin.Vance@dlr.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: transforming predictions from loglinear models
Date   Fri, 26 Aug 2005 10:49:02 +0200

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/



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