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: Re: Re: st: detonator plot with three grouping variables


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: Re: Re: st: detonator plot with three grouping variables
Date   Mon, 13 May 2013 19:31:27 +0100

The help file for -stripplot- (SSC) says

 graph_options are options of scatter, including by(), on which see
by_option. Note that
        by(, total) is not supported with bars or boxes. jitter() is
often helpful.

and there are several examples using the -by()- option. Perhaps you
are using an out-of-date version.

Nick
[email protected]


On 13 May 2013 19:26, Seed, Paul <[email protected]> wrote:
> Thank you Nick,
>
> I didn't used -by()- because it isn't in the help file for stripplot.
> However, it is usefully flexible.  You can actually put more than
> variable in, which saves you from creating the variable group.
> Also, you can specify one row only, which (to my eyes) improves the plot.
>
> Reading the plot, it appears that price is very variable in the
> domestic cars with poor repair records - some the most
> expensive cars and the cheapest have the worst records;
> a fact that might have been missed if only means and SE had been shown.
>
>
> ************** Start code  ********************
> * Set up data as before
>
> * No longer needed
> * egen group = group(lwst foreign), label
>
> #delim ;
> stripplot price, over(rep_78_) bar(mean(ms(smx)
> msize(huge) ) msize(vhuge) level(68)) vertical centre
> jitter(2) boffset(0) ylabel(0(5000)20000, ang(h))
> by(lwst foreign, note("") row(1))
> ;
>
> #delim cr
>
> *************** End code  *********************
>
> BW
>
> Paul T Seed, Senior Lecturer in Medical Statistics,
> Division of Women's Health, King's College London
> Women's Health Academic Centre, King's Health Partners
> (+44) (0) 20 7188 3642.
>
>> ------------------------------
>>
>> Date: Fri, 10 May 2013 12:46:17 +0100
>> From: Nick Cox <[email protected]>
>> Subject: Re: Re: st: detonator plot with three grouping variables
>>
>> Thanks for the confirmation on the coinage of "detonator plot".
>> Whoever coined "dynamite plot" was quite possibly inspired by the same
>> kind of movie experience.
>>
>> Your detailed code is very welcome for showing real possibilities. As
>> the author of -stripplot- (SSC) I can add a footnote.
>>
>> It is true that -stripplot- does not support more than one -over()-
>> option, but it does support -by()- and that can serve a similar
>> purpose. Thus producing separate -stripplot-s can be avoided to a
>> large extent. In place of the closing loop here is some alternative
>> code
>>
>> egen group = group(lwst foreign), label
>>
>> #delimit ;
>> stripplot price, over(rep_78_) bar(mean(ms(smx) msize(huge) )
>> msize(vhuge) level(68))
>>                          vertical centre jitter(2) boffset(0)
>>                          ylabel(0(5000)20000, ang(h)) by(group,
>> note("")) ;
>>
>> Nick
>> [email protected]
*
*   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