Hey everyone,
I´m having a question regarding the generation of variables. As you can see below, an excerpt of my dataset is shown. For my data analysis I want to create variables that show the name of the successor for each observation. I have already done this for numeric variables (using egen xx = total(y)), however I wasn´t able to generate these kind of variables for the exec_lname variable.
The name of the successor (Horton in this example) should be shown at every observation with the same succession_id2.
Thanks in advance!
I´m having a question regarding the generation of variables. As you can see below, an excerpt of my dataset is shown. For my data analysis I want to create variables that show the name of the successor for each observation. I have already done this for numeric variables (using egen xx = total(y)), however I wasn´t able to generate these kind of variables for the exec_lname variable.
The name of the successor (Horton in this example) should be shown at every observation with the same succession_id2.
Thanks in advance!
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long gvkey double co_per_rol str20 exec_lname float(successor succession_id2 successor_id) 1045 29349 "Reding" . 2 166150 1045 29348 "Kennedy" . 2 166150 1045 14221 "Arpey" . 2 166150 1045 43629 "Goren" . 2 166150 1045 16477 "Garton" . 2 166150 1045 33126 "Horton" 1 2 166150 end
Comment