Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: Deleting a cohort

From   David Kantor <>
Subject   Re: st: Re: Deleting a cohort
Date   Thu, 29 Mar 2007 09:43:15 -0400

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.

* For searches and help try:

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