Dear Stata Community,
I need your guidance in calculating the CEO PAY SLICE (CPS) proposed by Bebchuk, Cremers, and Peyer (2011) (Bebchuk, L. A., Cremers, K. M., & Peyer, U. C. (2011). The CEO pay slice. Journal of financial Economics, 102(1), 199-221).

They computed CPS as a fraction of the total compensation (TDC1) to the group of top-five executives that is received by the Chief executive officer (CEO).
Moreover, they calculated Industry Median CPS as the median CPS in the four-digit standard industrial classification (SIC) group.



They show that they restrict their firm years in which the CEO was in office for the entire year. This avoids observations with artificially low CPS due to the fact that a CEO has received compensation only for part of the year.
Also, for some firm-years more than five executives are listed in ExecuComp. In such cases, they use only the five executives with the highest compensation

For this purpose, I have collected the following data for estimation:
1. CID= Company ID
2. YEAR= Year
3. CO-PER-ROL= Executive ID
4. CEOANN= Executive including CEO.
5. TDC1= Executive Compensation
6. SIC-CODE= Four-digit SIC code.

I am trying to learn estimation and am at very basic stages. Your help will be a big boost in my learning process. Thanks in advance.

Miral

* Example generated by -dataex-. To install: ssc install dataex
clear
input long CID double(YEAR CO_PER_ROL) str4 CEOANN double(TDC1 SIC_CODE)
1 1992 5622 "" . 5080
1 1992 5623 "" . 5080
1 1992 5624 "" . 5080
1 1992 5625 "" . 5080
1 1992 5626 "" . 5080
1 1993 5622 "" . 5080
1 1993 5623 "" . 5080
1 1993 5624 "" . 5080
1 1993 5625 "" . 5080
1 1993 5626 "" . 5080
1 1994 5622 "CEO" 1255.855 5080
1 1994 5623 "" 958.561 5080
1 1994 5624 "" 549.985 5080
1 1994 5625 "" 306.531 5080
1 1994 5626 "" 268.631 5080
1 1995 5622 "CEO" 1466.23 5080
1 1995 5623 "" 1196.495 5080
1 1995 5624 "" 656.943 5080
1 1995 5625 "" 355.106 5080
1 1995 5626 "" 326.406 5080
1 1996 5622 "" 1826.272 5080
1 1996 5623 "CEO" 2853.619 5080
1 1996 5624 "" 842.61 5080
1 1996 5625 "" 479.404 5080
1 1996 5626 "" 446.641 5080
1 1997 5622 "" 1908.903 5080
1 1997 5623 "CEO" 4440.298 5080
1 1997 5624 "" 1265.422 5080
1 1997 5625 "" 511.354 5080
1 1997 5626 "" 592.942 5080
1 1997 20106 "" . 5080
1 1998 5622 "" 1951.482 5080
1 1998 5623 "CEO" 3807.385 5080
1 1998 5624 "" 1292.688 5080
1 1998 5625 "" 522.315 5080
1 1998 5626 "" 632.289 5080
1 1998 20106 "" . 5080
1 1999 5623 "CEO" 1475.225 5080
1 1999 5624 "" 1118.275 5080
1 1999 5625 "" 489.636 5080
1 1999 5626 "" 687.828 5080
1 1999 20106 "" 238.697 5080
1 1999 24312 "" . 5080
1 2000 5623 "CEO" 3910.003 5080
1 2000 5624 "" 881.254 5080
1 2000 5625 "" 562.794 5080
1 2000 5626 "" 752.76 5080
1 2000 20106 "" 302.12 5080
1 2000 24311 "" . 5080
1 2000 24312 "" . 5080
1 2001 5623 "CEO" 2047.286 5080
1 2001 5625 "" 402.477 5080
1 2001 5626 "" 457.27 5080
1 2001 20106 "" . 5080
1 2001 24311 "" 1032.186 5080
1 2001 24312 "" 362.377 5080
1 2001 28074 "" . 5080
1 2002 5623 "CEO" 2080.489 5080
1 2002 5625 "" 378.409 5080
1 2002 5626 "" 423.979 5080
1 2002 20106 "" 206.57 5080
1 2002 24312 "" 394.049 5080
1 2002 28074 "" . 5080
1 2003 5623 "CEO" 4325.731 5080
1 2003 5625 "" 845.068 5080
1 2003 5626 "" 1180.747 5080
1 2003 24312 "" 805.298 5080
1 2003 28074 "" 925.025 5080
1 2004 5623 "CEO" 7045.048 5080
1 2004 5625 "" 667.048 5080
1 2004 5626 "" 764.41 5080
1 2004 24312 "" 665 5080
1 2004 28074 "" 710.2 5080
1 2005 5623 "CEO" 6568.409 5080
1 2005 5625 "" 1332.728 5080
1 2005 5626 "" 1477.967 5080
1 2005 24312 "" 1535.232 5080
1 2005 28074 "" 1341.546 5080
1 2006 5623 "CEO" 6787.1 5080
1 2006 5625 "" 1597.1 5080
1 2006 5626 "" 1885.9 5080
1 2006 24312 "" 1981.3 5080
1 2006 28074 "" 1628.07 5080
1 2007 5623 "CEO" 2453.37 5080
1 2007 5625 "" 595.516 5080
1 2007 5626 "" 1319.183 5080
1 2007 24312 "" 1180.075 5080
1 2007 35684 "" 777.177 5080
1 2008 5623 "CEO" 3313.996 5080
1 2008 5626 "" 1535.412 5080
1 2008 24312 "" 956.247 5080
1 2008 35684 "" 952.892 5080
1 2008 38212 "" 1231.741 5080
1 2009 5623 "CEO" 6435.641 5080
1 2009 5626 "" 3055.124 5080
1 2009 24312 "" 1244.039 5080
1 2009 35684 "" 1770.594 5080
1 2009 38212 "" 1641.556 5080
1 2010 5623 "CEO" 5237.743 5080
1 2010 5626 "" 2554.467 5080
end