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 on April 23, 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   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: automatically adjusting for bias in antilog transformation?
Date   Fri, 1 Oct 2010 13:49:37 -0400

Tatyana Deryugina <tatyanad@mit.edu>:

clear all
sysuse nlsw88
ren married x1
ren south x2
ren ttl_exp z1
ren tenure z2
ren wage y
prog dyxx, eclass
poisson y x1 x2 z*, r
preserve
predict yhat if e(sample)
replace x1=0
replace x2=0
predict y0
g dy=y0-yhat
su dy
restore
tempvar e
g `e'=e(sample)
mat b=r(mean)
eret post b, es(`e')
end
dyxx
bs:dyxx

See also
http://www.stata.com/meeting/boston10/boston10_nichols.pdf
for some simulations on how well GLM with a log link (or -poisson-) does
relative to common alternatives.

On Fri, Oct 1, 2010 at 1:19 PM, Tatyana Deryugina <tatyanad@mit.edu> wrote:
> Thank you for the article reference! It was a very informative read.
> Unfortunately, I'm still not sure how I can do what I'd like to do.
> Suppose I have a model Y = exp(ax_1+bx_2+Z'c+epsilon), where Z is a
> large number of controls. What I want to compute is E(Y|X_1,X_2 = 0) -
> E(Y|X_1=x_1,X_2 = x_2) or, alternatively, the effect on Y (not its
> log) of x_1 and x_2 (both x_1 and x_2 are dummy variables). Is there a
> simple way to do this with GLM?
>
> Sincerely,
> Tatyana
*
*   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