Announcement

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

  • Margins REG3

    Hi Folks, I am trying to figure out how to incorporate the information from one equation into another equation via the margins command. I am estimating the model below. Using my approach, I am able to see how y is impacted by age via distance. But, ultimately, I would like a marginsplot of y vs age. Is there a way to do this? Thanks!

    Code:
    clear all
    use http://www.stata-press.com/data/r13/margex
    reg3 (y=distance) (distance = age i.sex)
    
    margins, at(age=(20(5)40)) predict(equation(distance))
    
    margins, at(distance=(53.14669(1)58.64088)) predict(equation(y))
    Last edited by Steven Archambault; 18 Nov 2018, 13:41.

  • #2
    I would be also interested to hear whether this question makes sense from a point of view different from econometrics.

    From econometrics point of view, I think the question does not make sense. The very nature of your exclusion restriction which makes your estimation possible, says that age does not have an impact on y, except for through distance. So whichever prediction you want to generate of y, it has to be based on distance.

    In the same time I do not see anything wrong with what you are doing above: you generated predictions of distance at values of age which are interesting to you, and then you generated predictions of y at those (previously generated) interesting values of distance...

    Comment


    • #3
      Good points, but what if age were in both equations? How do we demonstrate the net impact of age on y, through both equations?

      Comment


      • #4
        This is a mediation problem rather than a simultaneous equation problem. You might look at the tools for mediation analysis (both user-written routines, and SEM).

        Comment


        • #5
          Very helpful Phil, thanks.

          Comment

          Working...
          X