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

RE: st: a little help

From   "Nick Cox" <>
To   <>
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. 


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:

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