Hi everyone,
I am new to Stata, using version 16.
I would like to take:
1) either an average of the total compensation (total_comp) of the two observations (within one year by one firm) if ceoann_dup is 1 (here the two observations in 2013)
2) or take the highest of the respective two total compensations within one year by one firm of the two indicated observations
I tagged all duplicates (ceoann_dup) and my dataset looks following:
gvkey fyear execid exec_fullname ceoann cfoann ceoann_dup total_comp
001004 2012 19999 Michael J. Sharp CFO 0 841.204
001004 2013 09249 David P. Storch CEO 0 5247.779
001004 2013 19999 Michael J. Sharp CFO 1 1003.249
001004 2013 46404 John C. Fortson CFO 1 1411.156
001004 2014 09249 David P. Storch CEO 0 5234.648
How could I operationalize this in Stata?
Thank you so much for you help!
I am new to Stata, using version 16.
I would like to take:
1) either an average of the total compensation (total_comp) of the two observations (within one year by one firm) if ceoann_dup is 1 (here the two observations in 2013)
2) or take the highest of the respective two total compensations within one year by one firm of the two indicated observations
I tagged all duplicates (ceoann_dup) and my dataset looks following:
gvkey fyear execid exec_fullname ceoann cfoann ceoann_dup total_comp
001004 2012 19999 Michael J. Sharp CFO 0 841.204
001004 2013 09249 David P. Storch CEO 0 5247.779
001004 2013 19999 Michael J. Sharp CFO 1 1003.249
001004 2013 46404 John C. Fortson CFO 1 1411.156
001004 2014 09249 David P. Storch CEO 0 5234.648
How could I operationalize this in Stata?
Thank you so much for you help!

!
Comment