I am struggling right now with following task (attached the data): I want to find the year in which most transitions happen.
So I created the transition year variable:
egen company_id = group(gvkey)
drop gvkey
//generate Transition year
gen transition_year = year + trans_window
//count transitions per year
drop gvkey
//generate Transition year
gen transition_year = year + trans_window
//count transitions per year
I first wanted to group(company_id transition year) as I want to count the number of different companies, all having a transition in this particular year
But I don't know how to continue? Does anyone know how I will find out this information?
Thanks!!!
Pauline
0 Response to count in groups
Post a Comment