Hello everyone,

Question:

Using the -margins- command, is it possible to combine the selection of an equation (from a multi-equation regression) and the transformation of the dependent variable of this equation at the same time?

Problem:

I'm trying to estimate the marginal effects of my model after running a two-equation regression. The first equation estimates the cost frontier and the second equation estimates the inefficiency distribution, which is used in the cost frontier function. For that purpose I’m using the user-written -sfpanel- command.

However, the coefficients of the inefficiency distribution cannot really be interpreted in a meaningful way, because the inefficiency is not bound between 0 and 1. A method to archive more meaningful results would be to transform the inefficiency (u) into efficiency (q) using the transformation formula: q = exp(-u).

Now I want to estimate the marginal effects from my second equation (inefficiency) but let the marginal effects be in the metric of efficiency (q).

I know that the -margins- command supports transforming the estimates using the -expression- option. If I’m correct, I could type:

Code:
margins, dydx(*) expression(exp((-1)*predict(xb))
As far as I know, however, this would estimate the marginal effects of my first equation (cost frontier) rather than the second one (inefficiency/efficiency).

I also know that I can specify the equation (called “Mu” here) to estimate the marginal effects from by typing:

Code:
margins , dydx(*) expression(equation(Mu))
That would neglect the desired transformation into Efficiency though.

So my question are:

1. Is it possible to combine the transformation and the selection of the equation with the -margins- command?

2. Is it correct what I typed for the transformation considering that the transformation from inefficiency (u) to efficiency is q = exp(-u).


Thank you very much in advance.

Best regards,
Sebastian