Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Using parent id variables in household data with Stata


From   "DELCLOS GOMEZ-MORAN, CARLOS-ERIC" <carloseric.delclos@upf.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Using parent id variables in household data with Stata
Date   Fri, 23 Nov 2012 16:50:24 +0100

Hello,

I am trying to count the number of children a mother has in a household
using the mother's id variable from the EU-SILC database.

Basically, the data looks something like this:

Year   country   houseid   pid         momid
2007   UK         600          60001     .
2007   UK         600          60002     .
2007   UK         600          60003     6001
2008   UK         600          60001     .
2008   UK         600          60002     .
2008   UK         600          60003     6001
2008   UK         600          60004     6001


So what I'd like to do is create a variable with a value for the number of
people (children) in the household who identify the person with that pid
(in this case 60001) as their mother.  Is this possible with Stata, and if
so, what is the best way to go about it?

Thanks so much,
Carlos Delclos
Universitat Pompeu Fabra
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index