[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Re: Deleting a cohort
At 09:04 AM 3/29/2007, Sergiy wrote:
gen flag=0
bys ID WAVE: replace flag=1 if empstat[1]="emp"
keep if flag==1
Sara may have gotten her solution by now, but, that should be
bys ID (WAVE): replace flag=1 if empstat[1]="emp"
Note the parens around WAVE. Otherwise, each record will be treated
in isolation. I've made this mistake many times.
--David
*
* 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/