Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: using "keep if"


From   "Vitorino, Maria Ana" <mvitorin@chicagobooth.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: using "keep if"
Date   Thu, 02 Apr 2009 17:36:46 -0500

Title: using "keep if"

Hi,
I am trying to use "keep if" to trim down the data that I want to use to label some observations on a plot.

Using "keep if" in the following command line seems to work:

spmap using "uscounty.dta" if state=="42", id(_ID) cln(2) ocolor(gs12 gs12)
fcolor(white white) legend(off) label(data ("coord.dta") select(keep if batch <3) y(lati) x(longi)
label(batch) ) title("Big Foot Sightings in Pennsylvania")

BUT, if I try to do the following:
...label(data ("coord.dta") select(keep if batch >3 & batch<6) y(lati) x(longi)...

I get an "invalid syntax" error...

How can I use the keep command with 2 conditioning statements?

Any suggestions are appreciated.
Thanks!
Ana




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