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]

Re: st: stripplot not stacking correctly


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: stripplot not stacking correctly
Date   Sun, 2 Mar 2014 23:35:20 +0000

Note also that there is _no_  equivalent of -over(state)- in the
command you are using as pattern and indeed none is needed for your
problem.
Nick
[email protected]


On 2 March 2014 23:25, Nick Cox <[email protected]> wrote:
> A varlist is just a variable list; it's got nothing to do with how
> many observations there are in a dataset.
>
> egen tag = tag(state)
>
> and then applying
>
> ... if tag
>
> to your command might help you to make progress.
>
> Nick
> [email protected]
>
> On 2 March 2014 23:11, Cody Cook <[email protected]> wrote:
>
>> I'm having problems with stripplot from SSC
>>
>> I'm trying to create something like this for my dataset:
>> http://imgur.com/wt9yZTx
>>
>> And this is what I'm getting:
>> http://imgur.com/4OIRmwT
>>
>> I'm having trouble figure out what I'm doing wrong. Here's the relevant code that I'm using:
>> stripplot state_avg, stack over(state) height(.5) ms(Sh) msize(*3.5) width(.01) mlabel(state) mlabpos(0) ysc(off) plotregion(lstyle(none))
>>
>> Some things about my dataset
>> -- It's got about 10,000 obs of tax rates for different counties in different states, disaggregated further by time (%tm)
>> -- state_avg is the average across state counties and all years/months of observations. 1 number per state.
>> -- state is just the state abbreviation. It's repeated a lot, since it goes state -- county -- date -- etc etc
>
>
>> I think I could fix this if, instead of state_avg (which has a ton of repeats since it's broken up by county and date), I could create a varlist with only 50 observations that contain the abbrev and the state_avg for that state. I'm not sure how to do this. In general, I struggle to make any varlist that's shorter than the total number of obs in my dataset.

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index