Statalist


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

Re: st: counting the number of nonmissing values in varlist for each observation


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: counting the number of nonmissing values in varlist for each observation
Date   Mon, 28 Dec 2009 08:28:34 -0800 (PST)

--- On Mon, 28/12/09, Ekaterina Hertog wrote:
> The problem is I have two types of variables starting with
> fammem: fammem1, fammem2 etc. until fammem10 (which note one's
> family members) and fammem1_liv, fammem2_liv etc. and I only 
> want to create the count of one's family members.

See -help varlist- for a variety of tricks, one solution is:
fammem? fammem10

another one is:
fammem1-fammem10
but this will only work if the variables fammem1 till fammem10 
are next to one another.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index