Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: a little help


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: a little help
Date   Wed, 5 Feb 2003 17:58:55 -0000

-count- does not allow a varlist, 
so the first SS1inHH needs to be removed

The extra information provided by 
a -tabulate- will usually be of interest. 

Nick 
n.j.cox@durham.ac.uk 

Brendan Cushing-Daniels
> 
> I think Steven's suggestion might not catch every HH with someone
> covered by public insurance (suppose the first person in 
> the HH is not
> covered by public insurance, but the second person is, for 
> example).  If
> SS1inHH is an indicator of how many people in the HH are covered by
> public insurance, as it appears to be from the original 
> posting, then
> the following modification to Steven's code may work:
> 
> bysort HH: ge tag = (_n==1)   /* or use -egen- tag function */
> count SS1inHH if (tag==1 & SS1inHH>=1).

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



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