Hello everybody,
I'm quite new to stata and am currently using it (or trying to use it) for my master thesis. I am quite a bit desperate right now and would really appreciate every help a lot!
My problem: I have panel data of U.S. banks from 2003-2017 including their age (years of existence). I study how the banks evolve over time as they get older, thus move from being a 'new entrants' in the banking sector (which I btw define as the first 8 years of a banks' existence) to becoming an incumbent (from the 9th year of their existence onwards).
The tricky thing is, that every year new banks enter. I want to categorize those banks for the first 8 years of their existence as new entrants and from the 9th year onwards as incumbents. Thus one and the same bank should be classified for a couple of years as a new entrant and later as an incumbent.
The table below displays in green the observations (banks) I want to group to the 'new entrant cohort' and in red the ones, I want to classify as incumbents.
For the incumbents' classification I run the following code: gen incumbents =1 if year >= 2012 & n1 >= 9
For new entrants, I am somewhat lost. For 2014, I would set up the code like this: gen newentrants2004 = 1 if year ==2004 & n1 == 1
...but then for 2005, I would need to include banks being 1 or 2 years old, for 2006 those being 1, 2, 3 years old.
Anyone who knows how to do this properly?
Thanks a lot!
Julia
I'm quite new to stata and am currently using it (or trying to use it) for my master thesis. I am quite a bit desperate right now and would really appreciate every help a lot!
My problem: I have panel data of U.S. banks from 2003-2017 including their age (years of existence). I study how the banks evolve over time as they get older, thus move from being a 'new entrants' in the banking sector (which I btw define as the first 8 years of a banks' existence) to becoming an incumbent (from the 9th year of their existence onwards).
The tricky thing is, that every year new banks enter. I want to categorize those banks for the first 8 years of their existence as new entrants and from the 9th year onwards as incumbents. Thus one and the same bank should be classified for a couple of years as a new entrant and later as an incumbent.
The table below displays in green the observations (banks) I want to group to the 'new entrant cohort' and in red the ones, I want to classify as incumbents.
For the incumbents' classification I run the following code: gen incumbents =1 if year >= 2012 & n1 >= 9
For new entrants, I am somewhat lost. For 2014, I would set up the code like this: gen newentrants2004 = 1 if year ==2004 & n1 == 1
...but then for 2005, I would need to include banks being 1 or 2 years old, for 2006 those being 1, 2, 3 years old.
Anyone who knows how to do this properly?
Thanks a lot!
Julia
Comment