Statalist


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

Re: st: Creating variables of parents education when ID is known


From   Eunsu Ju <[email protected]>
To   [email protected]
Subject   Re: st: Creating variables of parents education when ID is known
Date   Sun, 15 Mar 2009 12:38:19 -0500

Thanks much, Martin.

Actually, I checked the FAQ page you posted before I sent out my question.
I think no example in the page is similar to my question. Am I missing
something?
I don't want to generate family mean but to have exact value of
someone in the family.
If there person number is constant, egen function may solve the problem.
Unfortunately, person number varies in my case.

If you think my question is answered in the page, could you please
specify example number that I pay more attention to.
Thank you.


Eunsu Ju





On Sun, Mar 15, 2009 at 3:12 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> Try http://www.stata.com/support/faqs/data/members.html
>
> HTH
> Martin
>
> -------- Original-Nachricht --------
>> Datum: Sun, 15 Mar 2009 02:47:28 -0500
>> Von: Eunsu Ju <[email protected]>
>> An: [email protected]
>> Betreff: st: Creating variables of parents education when ID is known
>
>> Hello Stata Users,
>>
>> I would like to generate a new variable which contains the information
>> of parents, e.g. dad's education.
>> My data looks like below.
>>
>>  FID  PID  Var1 Edu Var3 FFID FPID Fedu
>>
>>  1001 100  XXX  XXX XXXX   ----   ----   ????
>>  1001 200  XXX  XXX XXXX   ----   ----   ????
>>  1001 300  XXX  XXX XXXX 1001  100  ????
>>  1001 310  XXX  XXX XXXX 1001  100  ????
>>  1002 101  XXX  XXX XXXX   ----   ----   ????
>>  1002 102  XXX  XXX XXXX   ----   ----   ????
>>  1002 200  XXX  XXX XXXX 1002  101  ????
>>  1002 300  XXX  XXX XXXX 1002  101  ????
>>  1002 310  XXX  XXX XXXX 1002  200  ????
>>  1002 320  XXX  XXX XXXX 1002  200  ????
>>
>>
>> *Note: FID = Family ID; PID = Person ID; FFID = Father's family ID;
>>           FPID = Father's person ID; Fedu = Father's Education
>>
>>
>> What I want to do is to have the last (far right) column, which is not
>> included in the dataset.
>> (I want to do this kind of works for other variables, e.g. Var1 and Var3.)
>>
>> What is the best & simplist way to do this in stata?
>>
>> I think I can do this like the following.
>> 1) Split the data set into two files so that one file contains Dad's
>> FID and Dad's PID, and the other has all others.
>> 2) Then, rename FID and PID in the second file as Dad's FID and Dad's PID.
>> 3) Rename Edu (and/or other variables I want to have at Dad's level)
>> as Dad's Edu
>> 4) Merge two files by matching Dad's FID and Dad's PID.
>>
>> However, there might be easier way to do this. Please let me know if
>> you know anything that makes the work easier.
>> Thanks much, in advance.
>>
>>
>> Eunsu Ju
>> Ph.D. Candidate, Research Specialist
>> School of Social Work, University of Minnesota
>> *
>> *   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/
>
> --
> Martin Weiss
> Hackersteigle 3
> 72076 Tübingen
> 00497071/793535
> 00491784597218
>
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
> *
> *   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/
>

*
*   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