Dear All:
I am trying to generate (age) variables for spouse and
mothers from the following:
hhold id S_id M_id Age
23 1 2 4 35
23 2 1 . 30
23 3 . 2 3
23 4 . . 65
45 1 2 . 50
45 2 1 . 40
45 3 . 2 12
45 4 . 2 8
45 5 . 2 5
45 6 3 . 30
45 7 . 3 2
45 8 . 3 5
hhold=household id
id=individual's id
S_id=spouse's id
M_id=mother's id
I wish to obtain S_age (spouse's age) and M_Age
(mother's age). The dataset should then look as
follows:
hhold id S_id M_id Age S_Age M_Age
23 1 2 4 35 30 65
23 2 1 . 30 35 .
23 3 . 2 3 . 30
23 4 65 . .
45 1 2 . 40 50 .
45 2 1 . 50 35 .
45 3 1 12 . 40
45 4 1 8 . 40
45 5 1 5 . 40
45 6 3 . 30 50 .
45 7 3 2 . 30
45 8 3 5 . 30
The problems:
(1)In one household (hhold=45), the head has 2 wives.
(2)In one household (hhold=23), the head has his
mother present.
Would deeply appreciate any help on how to proceed in
generating the 2 variables i.e. S_Age and M_Age.
Many thanks.
Asad.
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.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/