Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: spmap myseriously dropping a category


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: spmap myseriously dropping a category
Date   Fri, 26 Feb 2010 17:21:45 -0000

A toy dataset that reproduces the problem would be quite enough to work
on. 

Nick 
[email protected] 

Dorothy Bridges

Allow me to preface this inquiry with an apology: I'm sorry that I am
not able to replicate my problem with publicly available datasets, and
that therefore this question may well be annoying and unanswerable.  I
simply don't know where else to turn.

I am using spmap to graph a ternary variable onto a map of the world.
My variable is time-series, and I would like to create one map for
each year.  When I create the map for 2005, or for 2000, or for 1990,
it appears just as I imagined it.  When I create the map for 1995,
though, Stata treats the first two categories as a single category.  I
cannot fathom why this is the case (yes, I'm sure that all three
levels of my variable occur in 1995).  The only difference in the
command line is an "if" clause.  In other words:

spmap var using file if year==2005 works beautifully, displaying three
colors corresponding to the three levels of var, but
spmap var using file if year==1995 displays only two colors, the first
corresponding to levels one and two, and the second corresponding to
level three.

There is nothing fancy about the variable -- it takes the values 1, 2,
and 3.


*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index