Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: matching childrens to mothers information


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: matching childrens to mothers information
Date   Mon, 21 Jan 2008 16:43:19 +0000 (GMT)

Thanks for the clarification. Friedrich Huebler is much smarter than I
am, and I think he solved your problem earlier today.

-- Maarten

--- Ana Gabriela Guerrero Serdan <[email protected]> wrote:

> --- Maarten buis <[email protected]> wrote:
> 
> > I am still puzzled: 
> > 
> > Do you have mothersnum in both datasets or just in
> > the dataset of the
> > children?
> 
> I have it in both datasets. But I only need it for the
> childrens dataset. As for the mothers I'm only using
> their roster number. 
> > 
> > Do you have in both datasets a variable that
> > idetifies to which familiy
> > someone belongs?
> 
> I have the houshold number (hhnum), which is a
> different value for each family. I also have the
> roster number which is basically a different number
> for each hh member. The mothernumber indicates the
> roster number of the mother. 
> > 
> > Is there in both datasets any information available
> > that alows you to
> > see if two observations belong together?
> > 
> > Well, I know for each child who is the mother by
> looking at the mothersnum which is the roster number
> of the mother. I also know the family they belong to. 
> 
> > 
> > --- Ana Gabriela Guerrero Serdan
> > <[email protected]> wrote:
> > 
> > > Sorry Maarten but I didnt explain myself
> > correctly. 
> > > 
> > > If I would have a unique identifier to match
> > children
> > > and mothers I would use it. What I have is a
> > variable
> > > for each children called mothersnum which tells me
> > the
> > > roster num of the mother. For mothers there is no
> > > indication of what is the roster number of the
> > child.
> > > So if I merge mothersnum in children database with
> > var
> > > mothersnum in full database I would get nothing
> > since
> > > the mothersnum in the full database is "." If I
> > use
> > > roster number I would then only match children
> > with
> > > themselves. 
> > > 
> > > Apologies if this was a confusing query but here
> > is
> > > what I have worked out and seems to be working
> > now. 
> > > 
> > > I have created a new identifier (id). 
> > > 
> > > In full database:
> > > 
> > > gen id=rosternum 
> > > gen msex=sex */doesnt necessarily reflects only
> > mother
> > > but just to differentiate from the sex var of
> > children
> > > with is also sex*/ 
> > > 
> > > gen mage=age */doesnt necessarily reflects only
> > mother
> > > but just to differentiate from the age var of
> > children
> > > with is also age*/ 
> > > 
> > > gen edumother=education */doesnt necessarily
> > reflects
> > > only mother but just to differentiate from the
> > > education var of children with is also education*/
> > 
> > > 
> > > sort hhnum id
> > > save as "mothersdatabase" 
> > > 
> > > list hhnum  roster id mothersnum mage msex
> > edumother
> > > 
> > >
> >
> +---------------------------------------------------------+
> > > hhnum   roster   id   mother~m   mage   msex  
> > > edumot~r 
> > >
> >
> ---------------------------------------------------------
> > > 1.      1        1    1       .     62      1     
> >   1
> > > 
> > > 2.      1        2    2       .     62      2     
> >   1
> > > 
> > > 3.      1        3    3       .     41      1     
> >   1
> > > 
> > > 4.      1        4    4       .     28      2     
> >   1
> > > 
> > > 5.      1        5    5       .     10      1     
> >   1
> > > 
> > >
> >
> ---------------------------------------------------------
> > > ............
> > >
> >
> ---------------------------------------------------------
> > > 11.      1       11   11       .      6      2    
> >   
> > > 1 
> > > 12.      1       12   12       9      0      1    
> >   
> > > 2 
> > > 13.      1       13   13       .     38      1    
> >   
> > > 1 
> > > 14.      1       14   14       .     32      2    
> >   
> > > 1 
> > > 15.      1       15   15       .     10      1    
> >   
> > > 1
> > >
> >
> ---------------------------------------------------------
> > > ............
> > >
> >
> ---------------------------------------------------------
> > > 21.      1       21   21         18      3      2 
> >   
> > > 2 
> > >  ..........
> > > 
> > > In childrens database:
> > > gen id=mothersnum
> > > sort hhnum id 
> > > save
> > > merge hhnum id using "mothersdatabase", nokeep 
> > > 
> > > list AI01 HR01 id sex age mothernum msex mage
> > > edumother
> > > 
> > > 
> > >
> >
> +------------------------------------------------------------------+
> > > AI01   HR01 id  sex  age  mot~rnum  msex  mage
> > > edumot~r 
> > > 
> > >
> >
> ------------------------------------------------------------------
> > > 1.1     12    9     1     0     9      2     30   
> >   
> > > 1
> > > 2.1     21   18     2     3    18      2     29   
> >   
> > > 1 
> > > 3.1     22   18     2     0    18      2     29   
> >   
> > > 1 
> > > 4.2      6    4     2     1     4      2     25   
> >   
> > > 1 
> > > 5.2      7    4     2     1     4      2     25   
> >   
> > > 1 
> > > 
> > >
> >
> ------------------------------------------------------------------
> > > .........
> > > 
> > > 
> > > So for child with rosternum 9 the mothers msex=2
> > > (female ofcourse!) and mage=30. 
> > > 
> > > Again apologies for my confusion. 
> > > 
> > > regards, 
> > > Gaby 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> 
=== message truncated ===


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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