It is fairly easy to identify which individuals have belonged to two or more households.
That is
bysort person (household) :
gen byte changed_hh = household[_N] != household[1]
How do I list observations in a group that differ on a variable?
http://www.stata.com/support/faqs/data/diff.html
Then you can identify
levelsof household if changed_hh
That sounds like part of your problem.
Nick
[email protected]
Dimitrije Tišma
I am doing a multilevel analysis in Stata (persons | households) but,
this being longitudinal data, some persons switch to other households
at some point, so some clusters (i.e. households) have common elements
(i.e. same id number belonging to different households in different
years). I was wondering what would be the most efficient way (loop?)
to identify whether two clusters have common elements.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/