Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Marginal Effects of Spline

    I am using mfxrcspline to make a graph of the marginal effects of my splined regressor (X), on the dependent variable (Y). However, my regressor (X) is a price ratio (A/B). When I run mfxrcspline, I get a beautiful graph of the marginal effects of dY/dX, but I would like the marginal effects in terms of B (denominator of the price ratio) if I hold A constant. In other words, I’d like to calculate dY/dB. Is there anyway to do this using mfxrcspline?

    Thank you!
    Last edited by Kelly AS; 29 Jun 2018, 12:10.

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    It doesn't make sense to run a model of a/b versus x and then ask for dy/db. There is also no spline involved in dy/db. I think you can calculate dy/db - it is created by construction. You might need to brush up on elementary calculus. Alternatively, you could regress a/b versus b and use margins.

    Comment

    Working...
    X