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

st: RE: creating a household level variable from an individual level variable


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: creating a household level variable from an individual level variable
Date   Thu, 24 Jul 2003 18:29:38 +0100

FAQ 

How do I create a variable recording whether any members 
of a group (or all members of a group) possess some characteristic?
http://www.stata.com/support/faqs/data/anyall.html

Nick 
n.j.cox@durham.ac.uk 

> -----Original Message-----
> jaks@zoom.co.uk
> 
> I wanted to know how to create a household level variable 
> from an individual 
> level variable. The individual variable is a dummy for 
> whether the person at 
> hand smokes or not (1/0). There are assumed to be 22 
> members in each household 
> (of a sample of 3872 households). I would like to create a 
> new (similar) 
> household level dummy variable to show whether at least one 
> person in that 
> household smokes, which is constant for all members of each 
> household (it would 
> read 1 or 0 for all members of the household depending on 
> whether or not any 
> given member of the household smokes).I have setup a 
> household id and 
> individual id.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index