Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Panel data and -spmap-


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Panel data and -spmap-
Date   Mon, 29 Apr 2013 17:14:43 +0100

In short, yes. You are just going to need to pile more conditions into
an -if- qualifier until -spmap- is satisfied.

-spmap- is from SSC. Please remember to explain where user-written
commands you refer to come from.

Nick
njcoxstata@gmail.com


On 29 April 2013 17:08, Jeremy Wells <jwell33@tigers.lsu.edu> wrote:

> I have a panel dataset with one observation per province-week over six years.
> I would like to draw maps using -spmap-, but I would like to have fewer than
> one map per week; thus, I created a year variable and entered
>
> spmap var using coorfile.dta if year==200X, id(province),
>
> which returns the following:
>
> Variable province specified in option id() does not uniquely identify the observations
> r(459);
>
> Is there a way around this that does not end up with me -collapse-ing the weekly data
> into years? A way to plot the mean, sum, change or any other average over the course
> of the 52 weeks would be ideal to have in this case, it seems.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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