I wonder if there's a way to express margins results for log transformed outcomes back in their original form. The predicted values after a margins command look really neat, but is there a way to get the exp() of these when the outcome is log transformed. For example, using "cars":
Code:
webuse auto, clear
hist price
gen log_price = log(price)
hist log_price
reg log_price trunk weight length
margins, at(weight=(1000 (500) 5000))
Predictive margins Number of obs = 74
Model VCE : OLS
Expression : Linear prediction, predict()
1._at : weight = 1000
2._at : weight = 1500
3._at : weight = 2000
4._at : weight = 2500
5._at : weight = 3000
6._at : weight = 3500
7._at : weight = 4000
8._at : weight = 4500
9._at : weight = 5000
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_at |
1 | 7.597239 .3124972 24.31 0.000 6.973983 8.220495
2 | 7.855574 .2364778 33.22 0.000 7.383933 8.327214
3 | 8.113909 .161188 50.34 0.000 7.792429 8.435388
4 | 8.372243 .0885091 94.59 0.000 8.195718 8.548769
5 | 8.630578 .0384534 224.44 0.000 8.553886 8.707271
6 | 8.888913 .0831622 106.89 0.000 8.723051 9.054775
7 | 9.147248 .1553891 58.87 0.000 8.837335 9.457162
8 | 9.405583 .230582 40.79 0.000 8.945702 9.865465
9 | 9.663918 .3065663 31.52 0.000 9.052491 10.27535
0 Response to Expressing margins predictions of log outcomes
Post a Comment