Hi dear Profs and colleagues,
I have 3 variables, firms ID: NPC_FIC , year & Firmsage: firm_age. I am going to obtain firmsage i,t. i for each firm and year 2010-2011 while keeping all obs.
(The period is for 12 years I mentioned an example for the first 2 years)
if I do this:
only one firm will be left, but I don't look for that. Is there any way to compute firms' age for i & t without dropping?
All my thanks.
I have 3 variables, firms ID: NPC_FIC , year & Firmsage: firm_age. I am going to obtain firmsage i,t. i for each firm and year 2010-2011 while keeping all obs.
(The period is for 12 years I mentioned an example for the first 2 years)
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long NPC_FIC byte firm_age int year 500000002 25 2010 500000002 25 2010 500000002 25 2010 500000002 25 2010 500000002 25 2010 500000119 22 2010 500000119 22 2010 500000119 22 2010 500000119 22 2010 500000119 22 2010 500000119 22 2010 500000119 22 2010 500000119 22 2010 500000346 18 2010 500000346 18 2010 500000346 18 2010 500000346 18 2010 500000346 18 2010 500000376 64 2010 500000376 64 2010 500000376 64 2010 500000376 64 2010 500000376 64 2010 500000376 64 2010 500000376 64 2010 500000376 64 2010 500000376 64 2010 500000395 12 2010 500000395 12 2010 500000395 12 2010 500000395 12 2010 500000395 12 2010 500000395 12 2010 500000856 25 2010 500000856 25 2010 500000856 25 2010 500000856 25 2010 500000856 25 2010 500000856 25 2010 500000856 25 2010 500000856 25 2010 500000856 25 2010 500000856 25 2010 500000002 26 2011 500000002 26 2011 500000002 26 2011 500000002 26 2011 500000002 26 2011 500000119 23 2011 500000119 23 2011 500000119 23 2011 500000119 23 2011 500000119 23 2011 500000119 23 2011 500000119 23 2011 500000119 23 2011 500000346 19 2011 500000346 19 2011 500000346 19 2011 500000346 19 2011 500000346 19 2011 500000376 65 2011 500000376 65 2011 500000376 65 2011 500000376 65 2011 500000376 65 2011 500000376 65 2011 500000376 65 2011 500000376 65 2011 500000376 65 2011 500000395 13 2011 500000395 13 2011 500000395 13 2011 500000395 13 2011 500000395 13 2011 500000395 13 2011 500000856 26 2011 500000856 26 2011 500000856 26 2011 500000856 26 2011 500000856 26 2011 500000856 26 2011 500000856 26 2011 500000856 26 2011 500000856 26 2011 500000856 26 2011 end
if I do this:
Code:
bysort NPC_FIC : keep if _n == _N
All my thanks.
Comment