Hello I am new to Stata.
I have a problem with matching data across waves. The data I have is looking at households which split or migrated from 2010 to 2013. The original HH in 2010 could split to anywhere between 2 to 3 newer households in 2013. some HH had no split. Also there is a variable that indicates whether a HH stayed the same, split or migrated.
There is also a unique household ID that maps each household to the original HH in 2010. Finally there is a variable that describes whether a household is in a rural or urban area.My aim is to show for those that split or migrated, whether their split was rural-rural; rural-urban; urban-rural; or urban-urban.
The data will look like this
HHID Year Rural/Urban HH Decision
1 2010 Rural Stayed
2 2010 Urban Stayed
3 2010 Rural Stayed
1 2013 Rural Migrated
1 2013 Urban Split
1 2013 Rural Stayed
2 2013 Urban Migrated
3 2013 Urban Migrated
3 2013 Rural Stayed


Note that all 2010 observations stayed because 2010 was the baseline. After then some HH split, some migrated, some stayed. From an initial HH more than one new HH may be born with some staying back and some migrating as is the case with observation 1. Some HH may migrate entirely as is the case with observation 2. My problem is showing how many rural-rural, rural-urban etc. splits or migration occured. I am not interested in cases where was no split as with the second observation of HH 3 in 2013.