0
$\begingroup$

I am building a gamma GLM regression model with a log link function. The model I fit is below:

log(y) = 6.04 + 0.00016(x) - 0.0000000027(x)^{2} + 0.00013(z)

I understand that I can calculate the marginal effect of x on log(y) by taking the derivative with respect to x. How can I calculate the marginal effect of x on y?

$\endgroup$

1 Answer 1

0
$\begingroup$

$$ \begin{split} \frac{dy}{dx} & = \frac{dy}{d\log y} \frac{d\log y}{dx} \\ & = \left(\frac{d\log y}{dy}\right)^{-1} \frac{d\log y}{dx} \\ & = y \cdot \frac{d\log y}{dx} \end{split} $$ In practice this means that the marginal effect of $x$ on $y$ *depends on the value of $y$, so you'd have to pick reference values of $x$ and $z$ (typically the mean values) to do the calculation.

Alternatively, you can frame the marginal effect on a log-response as a proportional change. If you compute the marginal effect of $x$ on $\log y$ and exponentiate it, you can frame it as a proportional effect (e.g. "a one-unit change in $x$ is associated with a ()-fold change in $y$")

$\endgroup$
1
  • $\begingroup$ Thank you very much for writing out this explanation for me! Is it possible to explain why exponentiating the marginal effect of x on log y gives you the proportional effect on y? Also, in my case, am I right that this proportionate effect on y would be e^{0.00016- 0.0000000052x} $\endgroup$ Jun 23 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.