Hi all,
I am working with a panel dataset which describes buildings zoning categories. Here's a simplified overview of the data for illustrative purposes:
My zoning_category variable is just the result of STATA's encode command - which helped me create the dummy rezoned to track changes in the panel overtime. However, I would also like to try to track changes in individuals between zoning categories to understand what types of individual buildings are being moved to which types of zoning groups. In reality, I have 134 groups of zoning categories and 9 million observations over 10 years. Taking the difference between zoning_category groups (the only thing I could think of) won't work since the differences won't be unique. In the end, I'm looking for create a table which lists the frequency of individual observations moving between groups for every possible combination of group to group movements which actually occurred, for example:
Does anyone have any suggestions on how I could tackle this? Apologies if something like this has been asked before.
I am working with a panel dataset which describes buildings zoning categories. Here's a simplified overview of the data for illustrative purposes:
building_id | zoning | zoning_category | rezoned | year |
001 | R6 | 54 | 0 | 2010 |
001 | R6 | 54 | 0 | 2011 |
001 | R6 | 54 | 0 | 2012 |
001 | R7 | 58 | 1 | 2013 |
001 | R7 | 58 | 0 | 2014 |
002 | R6 | 54 | 0 | 2010 |
002 | R6 | 54 | 0 | 2011 |
002 | R6 | 54 | 0 | 2012 |
002 | R6 | 54 | 0 | 2013 |
zoning initial | zoning post | no. of observations |
R6 | R7 | 142 |
R6 | R8 | 3 |
R6 | R2 | 2 |
R6 | R3 | 42 |
Comment