Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: counting number of children in a household


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: counting number of children in a household
Date   Thu, 23 Feb 2006 09:56:40 -0000

Also, 

How do I create variables summarizing for each individual properties of the other members of a group? 
http://www.stata.com/support/faqs/data/members.html

Nick 
[email protected] 

Austin Nichols
 
> Many ways to go, but perhaps the easiest to follow is:
> 
> egen hhid=group(ent mun numviv numhog)
> g kid=age<18
> egen nkids=sum(kid), by(hhid)
 
Scott Cunningham 

> > Thanks to those who answered my last question.  I have one more now.
> > I need to count how many children are in a given household 
> and assign
> > this number to each individual in the same household.
> >
> > I do not have a specific household id, but rather, I can distinguish
> > households by first, the state id (ent), then the municipality id
> > (mun), then the community id (numviv), and then household number
> > (numhog).
> >
> > Also, can I some how, assign a specific household id number 
> such that
> > I do not have to look at the state, the municipality, the community
> > and then the household.

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