Hi Statalist,

I want to create a chart to record the title changes of exectuives.

For example, I want to know how many CEO changed their titles to CEO, CFO, and other titles. So do former CFOs and others.

below is my sample data. Variable "last" means the last title of this executive. For titles: 1=CEO, 2=CFO, 3=OTHER:
[CODE]
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long(gvkey execid) float(current_title last)
 10553   2 3 1
 10553   2 3 1
 10553   2 3 1
 10553   2 3 1
 10553   2 3 1
 10553   2 3 1
 10553   2 3 1
 10553   2 3 1
 10553   2 3 1
132502   2 3 1
132502   2 3 1
132502   2 3 1
132502   2 3 1
132502   2 3 1
  1246  19 1 3
  1246  19 1 3
  1246  19 1 3
 64117  19 1 3
 64117  19 1 3
 64117  19 1 3
  9563  28 1 1
  9563  28 1 1
  9563  28 1 1
 28349  28 1 1
 28349  28 1 1
 28349  28 1 1
  1543  47 3 1
  1543  47 3 1
  1543  47 3 1
  1543  47 3 1
  4990  47 3 1
  4990  47 3 1
  4990  47 3 1
  1848  83 3 3
  1848  83 3 3
  1848  83 3 3
  1848  83 3 3
113491  83 3 3
113491  83 3 3
113491  83 3 3
  2111 116 1 1
  2111 116 1 1
  2111 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7257 116 1 1
  7620 119 3 3
  7620 119 3 3
  7620 119 3 3
  7620 119 3 3
  7620 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
 64135 119 3 3
  2424 152 1 1
  2424 152 1 1
  2424 152 1 1
  2424 152 1 1
  2424 152 1 1
  2424 152 1 1
  6799 152 1 1
  6799 152 1 1
  6799 152 1 1
  6799 152 1 1
  6799 152 1 1
  2490 158 1 3
  2490 158 1 3
  2490 158 1 3
  2490 158 1 3
  3851 158 1 3
  3851 158 1 3
  3851 158 1 3
  2529 179 1 1
  2529 179 1 1
  2529 179 1 1
  2558 179 1 1
  2558 179 1 1
  2558 179 1 1
  2558 179 1 1
  2558 179 1 1
  2558 179 1 1
  2558 179 1 1
  2558 179 1 1
end
thank you!