Announcement

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

  • Panel Data Average Line Graphs

    Hi everyone,
    I am using panel data and am trying to graph CEO compensation over a specific time period using a line graph showing the average CEO compensation for each year for all my firms in the panel. However I am having some difficulties as the graph that I get when I do a two way line graph I get the below image. Any ideas how I get a graph showing the average CEO compensation over time to show how its changed over time? Many thanks in advance, Oliver

  • #2
    Dear Oli, given your data set is a panel one, you may have to collapse it first before you draw the graph. Apart from it, do remember to use the option -sort- when you draw the line graph.
    You may also show your data example using -dataex- so that other statalisters know how to help you.
    2B or not 2B, that's a question!

    Comment


    • #3
      it seems that you have panel data.
      stata has great tools. as a start, you could:
      Code:
      xtset id year
      xtreg CEOTotalComp i.year
      margins i.year
      marginsplot, x(year)

      Comment

      Working...
      X