Announcement

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

  • Margins : marginal effects for all observations

    Hello,

    I'm currently running into some issue with margins.


    I'm estimating 2 models, a fractional regression with fracreg and a negative binomial regression with nbreg, let's consider this last model for the example.


    First I estimate my model :
    Code:
    nbreg y x1 x2 x3
    Then I compute marginal effects :
    Code:
    margins, dydx(x1 x2 x3)

    Stata returns a table with the average and standard errors of marginal effects.

    The issue is, I need all individual values of marginal effects, but I can't find where Stata store them (no mention of individual marginal effects in the documentation).


    To compute average marginal effects stata had to compute the individual values at some point, does it store them somewhere not mentionned in the doc?

    If it doesn't store them at all, do you know a way to compute marginal effects for each observation in this case please?


    Best Regards,
    Yoann Morin.

  • #2
    Yoann: Look at
    Code:
    help undocumented
    and then at margins, generate(...)

    (Why this is undocumented I do not know.)

    Comment


    • #3
      Thank you very much for your help, I didn't know about undocumented options/functions.

      A note for other users, this option seems to only exists since Stata 14.

      Comment

      Working...
      X