Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: identifying clusters with common elements


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: RE: identifying clusters with common elements
Date   Thu, 21 Jan 2010 18:18:27 -0500

Dimitrije Tišma <[email protected]>:
Did you sort this out already, or are you still looking for a solution?
If still looking, can you provide a brief description of the current
data structure?

On Mon, Jan 18, 2010 at 6:09 AM, Dimitrije Tišma
<[email protected]> wrote:
> This would be more helpful if I was only interested in which
> individuals move. But, I am rather interested in information on the
> household level, i.e. do the households A and B share same members in
> the longitudinal perspective? If this is the case, then my goal would
> be to consider these two households one "artificial household". I am
> thinking of some nice loop, but haven't been able to do it properly
> because number of household members varies from one HH to another.
> Thanks a lot in advance.
>
>
>
>
>
> 2010/1/17 Nick Cox <[email protected]>:
>> 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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index