Dear Stata Listers,
I am using linear regression with a logged dependent variable because of heteroskedasticity in the residuals of my preferred model, which most likely comes from my highly right skewed dependent variable. Generally the interpretation of the coefficients of the main effect in the log model is clear to me (use of exponentiated coeff, interpret in terms of percentage change), but with interaction effect it seems to become much more difficult and I am not sure if I got it right. For me the major problem seems to be how to calculate a meaningfull average marginal effect
Here a simple examle using the auto data
If I exponentiate the conditional AME, does this produce a meaningfull average marginal effect for the non-linear modell with logged dep var? Can it be interpreted as the average effect of foreign for different levels of rep78 in terms of percentage change?
e.g. For low repair record a change from domestic to foreign results in 17% lower price (exp(-0.18)-1)*100=-16.5
I dont know if this really makes sense, but I have no other idea. Any comments and suggestions are very welcome!
PS: I am aware of the pros and cons of using a logged dep var but I would still like to know if there is a way to do this
I am using linear regression with a logged dependent variable because of heteroskedasticity in the residuals of my preferred model, which most likely comes from my highly right skewed dependent variable. Generally the interpretation of the coefficients of the main effect in the log model is clear to me (use of exponentiated coeff, interpret in terms of percentage change), but with interaction effect it seems to become much more difficult and I am not sure if I got it right. For me the major problem seems to be how to calculate a meaningfull average marginal effect
Here a simple examle using the auto data
Code:
sysuse auto, clear gen lnprice=ln(price) recode rep78 (1 2 3=0) (4 5=1) // generate a dummy variable reg lnprice i.rep78##i.foreign //dummy interaction margins, dydx(foreign) at(rep78=(0 1)) //conditional AME ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- 1.foreign | _at | 1 | -,1839331 ,2363194 -0,78 0,439 -,6558956 ,2880293 2 | ,0954846 ,1506598 0,63 0,528 -,2054038 ,3963729 ------------------------------------------------------------------------------
e.g. For low repair record a change from domestic to foreign results in 17% lower price (exp(-0.18)-1)*100=-16.5
I dont know if this really makes sense, but I have no other idea. Any comments and suggestions are very welcome!
PS: I am aware of the pros and cons of using a logged dep var but I would still like to know if there is a way to do this
Comment