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

RE: st: identify group of observations


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: identify group of observations
Date   Thu, 29 Apr 2004 14:41:32 +0100

Ha! My fix needs a fix. 

Nick 
[email protected] 

gen grp = sum(flag == "01") if flag != ""

or

gen grp = sum(flag == "01") if !mi(flag)

or perhaps even

gen grp = sum(flag == "01") if trim(flag) != ""

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