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
"Seed, Paul" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: Re: Re: st: detonator plot with three grouping variables
Date
Mon, 13 May 2013 18:26:12 +0000
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/