Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: matching children and parents


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: matching children and parents
Date   Wed, 12 Jun 2013 09:26:57 +0100

This is an FAQ:

http://www.stata.com/support/faqs/data/members.html

is an out-of-date URL, but you should be re-directed. (As I write the
Stata site seems to be temporarily inaccessible.)

Another approach is schematically

egen mother_education = total(education / (person == mother)), by(household_id)

which assumes that education is a numeric variable and there is at
most one mother in each household. This is likely to be too simple, so
see the FAQ above.

Another approach is to reduce your dataset to a dataset of mothers and
a dataset of children and then -merge-.


Nick
[email protected]


On 12 June 2013 08:45, Andrea Smurra <[email protected]> wrote:
> Hello everyone.
> I am dealing with a big household survey.
> I am interested in child labor and education and my objective is to create variables for each children representing parents or household' characteristics.
> In particular, for each children I created two variables specifying the IDs of mother and father. Now I would like to create a  variable that, for each children, specifies parents' education in the following way
>
> motheredu_i=education[motherID_i]
>
> where education is a variable already in the dataset
>
> I know a way to do this, but it is extremely time consuming and I was wondering what would be the syntax to create the above "function".
>
> Thanks.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index