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]
st: Re: how to create a dummy with information across rows
From
ana mylena aguilar <[email protected]>
To
statalist <[email protected]>
Subject
st: Re: how to create a dummy with information across rows
Date
Fri, 6 Dec 2013 13:14:25 -0500
Ana
On Thu, Dec 5, 2013 at 6:11 PM, ana mylena aguilar <[email protected]> wrote:
> Hello
> I have a datatset with information by households ( rows) and
> individual household members in the columns.Household size can go all
> the way until 25. Therefore, the format for x number of variables is
> for example age1..age25.I reshaped the dataset to have household
> members within each household in each row as below. However, I need to
> contruct a variable that require using infomation across rows.
> hh roster line age rel with hh head child's mother line
> (only <14 years old)
> 1 1 35 household head
> missing
> 1 2 15 daughter missing
> 1 3 10 daughter 1
> 1 4 1 grandson 2
> I need to create a dummy variable to identify a teen mother in the
> household. In this case, there is one (line 2). The household is
> formed by a mother, two daughters ( age 15 and 10) and a grandson. The
> older daughter has a 1 year old child. Every child under 14 has
> information on who is his/her biological mother ( roster line of the
> mother). But I would like to link the information of the chidl with
> the young mother. Do I need to re-reshape or a loop would work?
>
> Any help would be great, 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/