Hello,
I am estimating a panel data model as follows:
where x_log is the natural logarithm of x, and m and z are continuous moderators. I want to obtain the marginal effect of x (not x_log) on y, for a grid of m and z values. So, -margins, dydx(x_log) at(m=(0(1)10) z=(0 1))- would not work.
I understand the effect of a one-unit increase in x is:
dydx = (_b[x_log] + _b[c.x_log#c.m]*m + _b[c.x_log#c.z]*z + _b[c.x_log#c.m#c.z]*m*z) / x
Would it be correct to use the following -margins- command to calculate the marginal effect of x (not x_log)?
Thanks.
I am estimating a panel data model as follows:
Code:
xtreg y c.x_log##c.m##c.z
I understand the effect of a one-unit increase in x is:
dydx = (_b[x_log] + _b[c.x_log#c.m]*m + _b[c.x_log#c.z]*z + _b[c.x_log#c.m#c.z]*m*z) / x
Would it be correct to use the following -margins- command to calculate the marginal effect of x (not x_log)?
Code:
margins, at(m = (0(1)10) z = (0 1)) expression((_b[x_log] + _b[c.x_log#c.m]*m + _b[c.x_log#c.z]*z + _b[c.x_log#c.m#c.z]*m*z) / x)
Comment