Marilyn,
Out of curiosity, what kind of data has households in which everyone
is either a father, mother, son, or daughter? What if there is no
father or more than one father in a household? Wouldn't it be more
precise if you had a variable that actually identifies the household
head, which may be simply the person listed first in each household?
Friedrich Huebler
--- "Ms. Marilyn Ibarra" <[email protected]> wrote:
> I have the following:
> 
> Household ID     Relationship     Remits
> 1                   father          1
> 1                   mother          1
> 1                   son             1
> 2                   father          .  
> 2                   mother          . 
> 2                   son             . 
> 3                   father          0  
> 3                   mother          0
> 3                   daughter        1
> 
> I would like to create a Remit_hh varible that tells me if 
> the head of household (we can assume it is always father for 
> this simple example) receives remittances.  Remits takes on 
> the value of 1 when the person receives and zero if they do 
> not receive.  
> 
> I tried the following: 
> 
> generate remits_hh=remits if relationship==father
> by hhid: replace remits_hh=sum(remits_hh)
> 
> It creates a problem where there are missing values, it 
> places a 0.  I guess I can then say: 
> 
> replace remits_hh=remits if remits==. 
> 
> but is there a better way to get at this than having to do 
> the third command to all my variables that have missing 
> values.
> 
> Marilyn. 
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.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/