Tuesday, February 28, 2006

Re: st: counting number of children in a household

This thread has taken a bizarre twist--Zamira Simkins <zs9814a@american.edu> replied to a question long ago asked and answered, after 5 days and 17 hours, to be more exact. She provided a technique that was incomplete (she did not address Scott's question of how to create hhid), typo-laden (putting -egen- for -gen- and "age<19" defining children, which is not a test of majority, in the US at least, ignoring state law in places like Alabama), inefficient (2 egens and a replace), and potentially error-prone (what does the max() function do for you when there are two moms in the HH?).

How exactly is this a triumph of clarity over brevity? The first answer was not optimally efficient in processing time or memory use, but a model of clarity compared to Zamira's approach:

egen hhid=group(ent mun numviv numhog) g kid=age<18 egen nkids=sum(kid), by(hhid)

As for the claim due to Neil Shephard <nshephard@gmail.com> that "A further problem with this is that it also assumes that children are literally that, ie. they are considered to be legally considered as children." Well. Hmm. It is a problem defining children as children?

If Scott Cunningham <scunning@gmail.com> had wanted to count biological children, he would have said so, and it would not make sense to count them at the household level, probably. "In the field of human genetics" would you count adopted children or only offspring when answering Scott's question?

Now foster children, counting kids at the family level, that's tricky. Perhaps there's something about that in the FAQ that Nick Cox so kindly provided the URL for? http://www.stata.com/support/faqs/data/members.html Only one way to know--read it.

On 2/28/06, David Bell <dcbell9@yahoo.com> wrote: > There are advantages to brevity. On the other hand, there are also > advantages to clarity. When I was a programmer (self employed), I > preferred Michael's brief approach. However, now that I work with > research teams including students, I have found that Zamira's more > verbose approach has its own distinct advantages.

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


Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?