At 05:49 PM 1/31/03 +0000, you wrote:
Watch two details among many others.
> bysort Household: egen Dependants = count( REL) if REL==3
Note that this kind of statement _excludes_ observations
for which REL != 3. This is not what you want _if_ the
intention is to see whether any other members of the family
have REL equal to 3.
Hi Nick,
Coupled with the statement that followed (bysort Household: egen
Dependants2 = mean( Dependants))
I think it did assign a count for whether or not there were dependants
within the household to the entire household; though I am certain there are
better ways to do that, but I am not as adept as you at coming up with
them. It seemed that despite several tries from others Rodrigo was still
without what he needed so I gave it a try. Appears he still doesn't have
the last reassignment, but I think I am not certain for the criteria he
wants for it.
Your point on the !=. habit is well taken. I am using Stata 8, however, I
have yet to upgrade my habits to take advantage o the new possibilities for
missings.
Your insights into crafting the subtleties is part of why so many of us are
grateful you are so active on this list.
Thanks for the insights.
Buzz Burhans
> replace SS2 = 3 if SS1 ==. & (CIVIL==1 & CIVILSUM==1 &
> Dependants2 != .)
The habit of writing
!= .
is going to become dangerous as you move to Stata 8
and make use of missing values .a to .z. The habit
to learn for not missing is
< .
Nick
[email protected]
*
* 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/
*
* 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/