Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: cross grouping a family w siblings and stepsiblings


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: cross grouping a family w siblings and stepsiblings
Date   Tue, 19 Apr 2011 09:25:48 +0100

This is an FAQ. See

FAQ     . . Creating variables recording prop. of the other members of a group
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
        4/05    How do I create variables summarizing for each
                individual properties of the other members of a
                group?
                http://www.stata.com/support/faqs/data/members.html


On Tue, Apr 19, 2011 at 8:54 AM, Tinne Steffensen <tst@sfi.dk> wrote:

> I am working with a dataset on disabled/not disabled children including all the children's siblings/stepsiblings and their parents.
>
> The goal is to group the id'ed children into groups w. siblings and step-siblings to see the average number of step-siblings etc. in families w. a disabled child and families w. a non-disabled child.
>
> Below you can see a small example, I have about 450.000 children id'ed.
>
> As you can see below In the illustration I tried grouping the families into groups by mother and father by using group(m_id) to give them a sort of family_id. But I can't quite move on from here. So in short; I am looking to group all 450.000 children into groups of siblings/step-siblings. Each child should have the same new familyid as all of its siblings/stepsiblings. But that should make some of the respondents appear in several family groupings. How do I deal with this kind of "cross-grouping"?
>
> I would greatly appreciate your comments.
>
> Tinne
>
>
>
>  Id    m_id       f_id        disbl      gr_m         gr_f
>
> 1          24       10          1             1         1
>
> 2          12        8          2             2         2
>
> 3           .        8          1             .         2
>
> 4          10       14          1             3         3
>
> 5           8        6          1             4         4
>
> 6          18       45          1             5         5
>
> 7          56        .          2             .         6
>
> 8          82        8          2             6         7
>
> 9          12        11         1             7         8
>

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index