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

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

From |
Lukas Borkowski <LukasBork@hotmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Interpretation of Interaction terms in log-lin |

Date |
Tue, 22 May 2012 14:40:24 +0200 |

Dear Marten, thanks for the hint (and many previous hints on onther topics). However, I have two concerns. First, some of my control variables are in logs as well - could I sill apply -glm- ? Second, I chose to use -xtreg- with -fe- and -re- options to control for unobserved effects. My panel has justv two time periods. How canI apply -glm- in this case, i.e. controlling for unobserved effects that are either fixed or random? Regards # Lukas Borkowski Am 22.05.2012 um 13:52 schrieb Maarten Buis: > On Tue, May 22, 2012 at 12:24 PM, Lukas Borkowski wrote: >> Dear all, >> >> my simplified model can be written as y = b0 + b1x1 + b2x2 + b3x1_x2 with the last expression being an interaction term. >> >> However, the dependent variable is in logs and the explanatory variables are not. I now wonder whether I have to add b2 and b3 before putting them into the e-function or to exponantiate each coeffecient seperately and then do the addition? > > I assume you first took the logarithm of your dependent variable and > than used that in a linear regression model (-regress-). In most cases > you would not do that. When you apply the exponential transformation > to coefficients of a linear regression with a log transformed > dependent variable you get effects in terms ratios of geometric means > rather than ratios of arithmetic ("normal") means, see: (Newson 2003). > In most cases you would want the latter and not the former. > > To get effects in terms of ratios of "normal" means you need to use > the dependent variable in the original metric and use the log link > function, that is, either use -glm- with the -link(log)- vce(robust)- > options or use -poisson- with the -vce(robust)- option. See: > <http://blog.stata.com/2011/08/22/use-poisson-rather-than-regress-tell-a-friend/> > > Consider the example below: > > *------------------ begin example --------------------- > sysuse nlsw88, clear > gen black = race==2 if race <= 2 > gen c_grade = grade - 12 > glm wage i.black##c.c_grade c.ttl_exp##c.ttl_exp , /// > link(log) vce(robust) eform > *------------------- end example ---------------------- > (For more on examples I sent to the Statalist see: > http://www.maartenbuis.nl/example_faq ) > > We can interpret that as follows: > A white individual with 12 years of education (= high school) and 0 > experience (= just entering the labor market) can expect a wage of 3.5 > dollars an hour (the exponentiated constant). > > A black individual with 12 years of education can expect (1-.84)*100%= > -16% less wage than white individuals with 12 years of education. > > A white individual can expect a 7% increase in wage for every year > extra education. > > This effect of education is 4% larger for black individuals. So the > effect of education for black individuals is 1.04*1.07=1.11, i.e. a > year increase in education leads to an 11% increase in wage for black > people. You can also compute this by adding the raw coefficients and > exponentiating that sum, which you can do by typing: > > lincom c_grade + 1.black#c.c_grade, eform > > Hope this helps, > Maarten > > Roger Newson (2003) Stata tip 1: The eform() option of regress. The > Stata Journal, 3(4):445. > <http://www.stata-journal.com/article.html?article=st0054> > > -------------------------- > 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/ > * * 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/

**References**:**st: Interpretation of Interaction terms in log-lin***From:*Lukas Borkowski <LukasBork@hotmail.com>

**Re: st: Interpretation of Interaction terms in log-lin***From:*Maarten Buis <maartenlbuis@gmail.com>

- Prev by Date:
**st: re reshape problem** - Next by Date:
**st: Re: Repeated Measures ANOVA vs. Friedman test** - Previous by thread:
**Re: st: Interpretation of Interaction terms in log-lin** - Next by thread:
**Re: st: Interpretation of Interaction terms in log-lin** - Index(es):