<>
This example from the help file works, even though it does not make too much
sense. I have Version 1.2.0 - 14 March 2008
****
use "Italy-OutlineData.dta", clear
spmap using "Italy-OutlineCoordinates.dta", id(id)
label(data("Italy-RegionsData.dta") select(keep if id<3 & id>1)
xcoord(xcoord) ycoord(ycoord) label(relig1) color(white) size(*0.7))
****
-set trace on- to find the spot where Stata issues the error and report back
to the list...
HTH
Martin
_______________________
----- Original Message -----
From: Vitorino, Maria Ana
To: [email protected]
Sent: Friday, April 03, 2009 12:36 AM
Subject: st: 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
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/