Hello everyone,
I am very new to Stata, using version 16.
I would like to keep my panel data structure and "merge" two rows (CEO & CFO data) into one row by gvkey fyear.
My dataset looks like this:
gvkey fyear execid ceoann cfoann total_comp_new
001004 2006 09249 CEO 6787.1
001004 2006 09252 CFO 1885.9
001004 2007 09249 CEO 2453.37
001004 2007 33979 CFO 777.177
001004 2008 09249 CEO 3313.996
001004 2008 33979 CFO 952.892
Currently I have for each gvkey and fyear two rows; one for CEO and its compensation variables and one row with CFO's compensation variables.
How could I operationalize in Stata that in the end I have for each firm year one row listing CEO and CFO variables horizontally?
Thank you so much for your help!
I am very new to Stata, using version 16.
I would like to keep my panel data structure and "merge" two rows (CEO & CFO data) into one row by gvkey fyear.
My dataset looks like this:
gvkey fyear execid ceoann cfoann total_comp_new
001004 2006 09249 CEO 6787.1
001004 2006 09252 CFO 1885.9
001004 2007 09249 CEO 2453.37
001004 2007 33979 CFO 777.177
001004 2008 09249 CEO 3313.996
001004 2008 33979 CFO 952.892
Currently I have for each gvkey and fyear two rows; one for CEO and its compensation variables and one row with CFO's compensation variables.
How could I operationalize in Stata that in the end I have for each firm year one row listing CEO and CFO variables horizontally?
Thank you so much for your help!
Comment