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]
re:st: How do I generate dummy variable for a nuclear family?
From
Christopher Baum <[email protected]>
To
"[email protected]" <[email protected]>
Subject
re:st: How do I generate dummy variable for a nuclear family?
Date
Sat, 5 Nov 2011 15:02:06 -0400
<>
I suppose it gets tricker if you want to say that, say, a single parent with kid(s) is not a nuclear family (is it? I don't know), but how about
// rule out singletons
bys hhid: g fam = _N > 1
egen maxrel = max(ar02), by(hhid)
g nuke = maxrel < 5 & fam
Kit
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/