I have a regression where the outcome is transformed using an inverse hyperbolic sine function. I want to calculate the marginal effect on the original scale, which I am doing it like this:
This expression is from p. 6 of this paper.
Unfortunately, this expression is labeled as a constant by margins, so it does not line up nicely with the other mpg coefficients when I try to build a table of them. I know I can use the rename() in Ben Jann's esttab, but that is not feasible for other reasons that would be a distraction to explain. Some Stata commands, like nlcom, allow you to rename the "coefficients". Is there something like that for margins?
Code:
sysuse auto, clear gen asinh_price =asinh(price) reg asinh_price mpg, robust margins, expression(.5*(exp(predict(xb)) + exp(-1*predict(xb)))*_b[mpg])
Unfortunately, this expression is labeled as a constant by margins, so it does not line up nicely with the other mpg coefficients when I try to build a table of them. I know I can use the rename() in Ben Jann's esttab, but that is not feasible for other reasons that would be a distraction to explain. Some Stata commands, like nlcom, allow you to rename the "coefficients". Is there something like that for margins?
Comment