Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: automatically adjusting for bias in antilog transformation?

From   Maarten buis <>
Subject   Re: st: automatically adjusting for bias in antilog transformation?
Date   Tue, 28 Sep 2010 16:22:44 +0000 (GMT)

--- On Tue, 28/9/10, Tatyana Deryugina wrote:
> I'm estimating a model of the following form: ln y = a + bx
> + cz + e, which I assume to be normally distributed with
> heteroskedastic errors. I would like to compute the average
> change in Y due to X,
> e.g.
> E[Y|X=x] - E[Y|X=0]. I know that simply computing
> exp(a_hat+b_hat*x+c_hat*z) - exp(a_hat+c_hat*z) will result
> in biased estimates.
> I found how to do the correction for heteroskedasticity in
> SAS and I'm wondering if there's a way to do the corresponding
> calculation in Stata without a lot of manual manipulation of
> the variables

It is best to prevent a problem before trying to fix it. In your 
case you are modeling E(log(y)) which gives you problems as 
exp(E(log(y))) != E(y). The simplest solution is to model log(E(y))
instead, because exp(log(E(y))) = E(y). In Stata you do this by 
using the -glm- command in combination with the -link(log)- option. 
A nice discussion of this can be found in this article:

Nicholas J. Cox, Jeff Warburton, Alona Armstrong, Victoria J. Holliday
(2007) "Fitting concentration and load rating curves with generalized
linear models" Earth Surface Processes and Landforms, 33(1):25--39.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index