Announcement

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

  • Plotting value of a coefficient in different categories

    Dear all,
    I would like to share with you a maybe simple question I'm struggling with since a lot.

    Often I need to plot the values that a given coefficient takes (let's say, the coefficient associated to the dummy being native\migrant) in different categories of a variable.

    I explain better. I run the following regression:

    reg wage native age_class territorial_area

    and I want to show graphically the values that the coefficient native assumes in different categories of age_class (graph A) and territorial_area (graph B), and then combining the two graphs.

    What strategy do you suggest to follow?

    Thanks a lot, best, G.

  • #2
    I gather the user-written coefplot may be helpful to you.
    Best regards,

    Marcos

    Comment


    • #3
      Perhaps:

      Code:
      reg wage i.native##(i.age_class i.territorial_area)
      margins age_class territorial_area, dydx(native)
      marginsplot
      Note: Assumes native is a categorical variable. If it is continuous, write c.native instead of i.native.

      Comment

      Working...
      X