Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Data Question


From   "Jules R. Elkins" <[email protected]>
To   [email protected]
Subject   st: Data Question
Date   Wed, 29 Sep 2004 12:58:04 -0700 (PDT)

Hi. 

I have a dataset where I am trying to match parents with their
children. The data is structured as follows:

Person  				Who is your parent?	Family ID
1 Head of Household				-		1
2 Spouse of household head			-		1
3 Male adult child of head/spouse		1, 2		2
4 Female adult child of head/spouse		1, 2		3
5 Underage child of head/spouse			1, 2		1
6 Daughter-in-law of head/spouse		-		2
7 Grandchild of head/spouse			3, 5		2
8 Grandchild of head/spouse			-, 4		3

I want to generate unique family IDs, where family is defined as
parent-child, not grandparents, etc.
	Family 1: 1, 2, 5
	Family 2: 3, 6, 7
	Family 3: 4, 8
But since I am concerned about children, I identify the families by
children who are younger than 21, hence the family ID of family 1 does not
include their adult children.

The only way it lists the parent-child relationship is by the line number
of the person. I am able to correctly match head and spouse with their
children, but in the above structure, how do I generate a unique ID for
family? The only way I seem to be able to do it confuses families 2 & 3.

Thank you for your help!
Jules Elkins


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