Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

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


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
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.
<http://www3.interscience.wiley.com/journal/114281617/abstract>

Hope this helps,
Maarten

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

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index