Announcement

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

  • plot the median against the year in a panel data !

    Hello,

    I want to plot the median of a variable against the year. As we all know, a panel consists of a lot of firms and years. This means that each year should consist of the median of all the data points of the firms in that specific year. If I wasn't clear, please tell me!

    Regards,
    Yousef

  • #2
    Could you please elaborate more on (1) your data (2) your desired graph?

    Comment


    • #3
      Code:
      egen mymedian = median(myvar), by(year) 
      egen tag = tag(year) 
      line mymedian year if tag, sort

      Comment

      Working...
      X