Hi guys,
I've got a question on my specific set of data.
It is ordered like this:
So for 1 manager number (mgrno), I have a list in which year (appyear) he held which firms (cusip).
Example (in bold): in 1981, manager 1 held firm E. In that year, firm E cited patents held by firm E and B. I want to know, if firm E and B were also owned by manager 1, in the years before 1980 (which is true for both in this example).
Unfortunately, I have absolutely no idea where to start. Even on paper I can't solve it without using mutliple nested loops. Does anyone have an idea on how to take on such an issue?
I've got a question on my specific set of data.
It is ordered like this:
Description | Manager number | Application year | Holding firm identifyer | Cited firm 1 | Cited firm 2 | Cited firm 3 | Cited firm 1356 | |
Variable name | mgrno | appyear | cusip | cusipcited 1 | cusipcited 2 | cusipcited 3 | … | cusipcited 1356 |
1 | 1980 | A | G | . | H | |||
1 | 1980 | B | B | D | I | Z | ||
1 | 1980 | C | A | . | . | . | ||
1 | 1980 | D | D | G | H | I | ||
1 | 1981 | E | E | B | . | . | ||
1 | 1981 | A | B | |||||
1 | 1981 | B | F | X | Y | Z | ||
1 | 1981 | C | G | |||||
1 | 1982 | D | ||||||
1 | 1982 | E | ||||||
1 | 1982 | A | ||||||
1 | 1982 | B | ||||||
… | … | … | ||||||
1 | 2006 | B |
Example (in bold): in 1981, manager 1 held firm E. In that year, firm E cited patents held by firm E and B. I want to know, if firm E and B were also owned by manager 1, in the years before 1980 (which is true for both in this example).
Unfortunately, I have absolutely no idea where to start. Even on paper I can't solve it without using mutliple nested loops. Does anyone have an idea on how to take on such an issue?
Comment