In addition to various helpful answers,
and more generally, please note the
resource of FAQs. On this one,
try
http://www.stata.com/support/faqs/data/selectid.html
Nick
[email protected]
Jason Payne
>
> Is there a way to list multiple cases that dont fit a
> standard expression in the replace command. for example:
>
> replace var1=1 if var2==1 or 3
>
> I want cases 1 and 3 to have value 1 for var1, but not case 2
> and rather than writing the whole syntax twice, i would like
> to shorten it:
>
> replace var1=1 if caseid==1
> replace var1=1 if caseid==3
<<winmail.dat>>