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

RE: st: a little help


From   "Nick Cox" <[email protected]>
To   <[email protected]>
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 
[email protected] 

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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index