In the research I am replicating I have to track the performance of a CEO in his old firm.
Therefore, in my data, I have to drop CEO's that do not have an 'old firm'
In Stata, I want to drop EXECID (the executives) if they are only 'matched' with one GVKEY (company).
So:
EXECID GVKEY
1234. 1111
1234. 1000
Can you help me finding a command for this?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str6(GVKEY EXECID) double YEAR "001004" "09249" 2012 "001004" "09252" 2012 "001004" "19999" 2012 "001004" "33979" 2012 "001004" "41787" 2012 "001004" "44858" 2012 "001004" "09249" 2013 "001004" "09252" 2013 "001004" "19999" 2013 "001004" "41787" 2013 "001004" "44858" 2013 "001004" "46404" 2013 "001004" "09249" 2014 "001004" "09252" 2014 "001004" "41787" 2014 "001004" "46404" 2014 "001004" "48195" 2014 "001004" "09249" 2015 "001004" "09252" 2015 "001004" "19999" 2015 "001004" "41787" 2015 "001004" "46404" 2015 "001004" "48195" 2015 "001004" "09249" 2016 "001004" "09252" 2016 "001004" "19999" 2016 "001004" "41787" 2016 "001004" "48195" 2016 "001004" "51706" 2016 "001004" "09249" 2017 "001004" "09252" 2017 "001004" "41787" 2017 "001004" "48195" 2017 "001004" "51706" 2017 "001004" "55405" 2017 "001004" "41787" 2018 "001004" "48195" 2018 "001004" "51706" 2018 "001004" "55405" 2018 "001004" "57007" 2018 "001004" "41787" 2019 "001004" "48195" 2019 "001004" "51706" 2019 "001004" "57007" 2019 "001004" "58967" 2019 "001004" "58968" 2019 "001045" "16654" 2012 "001045" "28279" 2012 "001045" "26059" 2012 "001045" "41119" 2012 "001045" "44119" 2012 "001045" "16654" 2013 "001045" "26059" 2013 "001045" "41119" 2013 "001045" "44119" 2013 "001045" "46189" 2013 "001045" "46190" 2013 "001045" "46191" 2013 "001045" "46192" 2013 "001045" "46193" 2013 "001045" "46189" 2014 "001045" "46190" 2014 "001045" "46191" 2014 "001045" "46192" 2014 "001045" "46193" 2014 "001045" "46189" 2015 "001045" "46190" 2015 "001045" "46191" 2015 "001045" "46192" 2015 "001045" "46193" 2015 "001045" "46189" 2016 "001045" "46190" 2016 "001045" "46191" 2016 "001045" "46192" 2016 "001045" "46193" 2016 "001045" "51368" 2016 "001045" "46189" 2017 "001045" "46190" 2017 "001045" "46191" 2017 "001045" "46193" 2017 "001045" "51368" 2017 "001045" "46189" 2018 "001045" "46190" 2018 "001045" "46191" 2018 "001045" "46193" 2018 "001045" "51368" 2018 "001045" "46189" 2019 "001045" "46190" 2019 "001045" "46191" 2019 "001045" "46193" 2019 "001045" "51368" 2019 "001072" "23168" 2012 "001072" "28509" 2012 "001072" "28510" 2012 "001072" "30078" 2012 "001072" "44860" 2012 "001072" "45158" 2012 "001072" "23168" 2013 "001072" "28510" 2013 "001072" "30078" 2013 end
0 Response to Drop variables
Post a Comment