Hello all,
I would like to create a binary variable that indicates if any particular observation is a subsidiary. When this is not the case, Ticker = ParentTicker.
My attempt was simple, and unsurprisingly did not work
gen subsidiary = 1
replace subsidiary = 0 if ParentTicker = Ticker
Let me know if there is an easy workaround for this.
Thanks,
Kayleigh
I would like to create a binary variable that indicates if any particular observation is a subsidiary. When this is not the case, Ticker = ParentTicker.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str26 Ticker str32 ParentTicker "" "" "" "" "000660 KS EQUITY" "000660 KS EQUITY" "000660 KS EQUITY" "000660 KS EQUITY" "000660 KS EQUITY" "000660 KS EQUITY" "HNSZ CH EQUITY" "000660 KS EQUITY" "HNSZ CH EQUITY" "000660 KS EQUITY" "HNSZ CH EQUITY" "000660 KS EQUITY" end
gen subsidiary = 1
replace subsidiary = 0 if ParentTicker = Ticker
Let me know if there is an easy workaround for this.
Thanks,
Kayleigh
Comment