Eva asked about
> How do "fill in" for the rest of the
> family, i.e. family 3 has 1 child and I want observation 5 and 6 to
> be equal to 1, for example.
>
> family children
> 1. 1 0
>
> 2. 2 0
> 3. 2 0
> 4. 2 0
>
> 5. 3 1
> 6. 3 0
>
> 7. 4 0
> 8. 4 2
>
> Thanks a lot,
> Eva
and Nick Cox and Stephen Jenkins suggested variants of:
> bysort family (children) : replace children = children[_N]
I would only add that if other information is collected at "head of
household" level (as is common) you might want to save that information
into a separate file, and use -merge- commands to 'fill in' values at
the person level. But go with the 'bysort' approach if it's just a few
variables you want to do this for.
Steve McKay
*
* 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/